How can I find details of the Windows C++ memory allocator that I am using?
Debugging my C++ application is showing the following in the call stack:
ntdll.dll!RtlEnterCriticalSection() - 0x4b75 bytes
ntdll.dll!RtlpAllocateHeap() - 0x2f860 bytes
ntdll.dll!RtlAllocateHeap() + 0x178 bytes
ntdll.dll!RtlpAllocateUserBlock() + 0x56c2 bytes
ntdll.dll!RtlpLowFragHeapAllocFromContext() - 0x2ec64 bytes
ntdll.dll!RtlAllocateHeap() + 0xe8 bytes
msvcr100.dll!malloc() + 0x5b bytes
msvcr100.dll!operator new() + 0x1f bytes
My multithreaded code is scaling very poorly, and profiling through random sampling indicates that malloc is currently a bottleneck in my multithreading code. The stack seems to indicate some locking going on during memory allocation. How can I find details of this particular malloc implementation?
I've read that Windows 7 system allocator performance is now competitive with allocators like tcmalloc and jemalloc. I am running on Windows 7 and I'm building with Visual Studio 2010. Is msvcr100.dll the fast/scalable "Windows 7 system allocator" often referenced as "State of the Art"?
On Linux, I've seen dramatic performance gains in multithreaded code by changing the allocator, but I've never experimented with this on Windows -- thanks.