I'm investigating a bad_alloc
crashes for a multithreaded native cpp app, from WinDbg it's clearly happening on allocating large object on heap (mostly basic_string ctor or some array allocation with new operator). From the !address -summary
and memory analysis from DebugDiag it's seems like app memory usage is very high but heap size is still very small (around 70 MB).
LFH Key : 0x233116ff
Termination on corruption : ENABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-----------------------------------------------------------------------------
05f60000 00000002 68964 56804 68964 8411 37570 13 2 29701
External fragmentation 14 % (37570 free blocks)
072a0000 00001002 60 4 60 2 1 1 0 0
096f0000 00001002 60 4 60 2 1 1 0 0
1f430000 00001002 60 4 60 2 1 1 0 0
-----------------------------------------------------------------------------
I want to dig deep into the memory from the usage table and find out the cause of higher memory allocation, any suggestion on how to proceed further?