Add memory profiling