Log xml memory usage for debugging
Differentiate between malloc and free
Merge branch 'feature/log_memleak' into feature/memory_fix