malloc wrappers for memory profiling