Log xml memory usage for debugging
Differentiate between malloc and free