Sample memory in smaller chunks when using memory profiling