I have a process that has ~6.5 GB of memory allocated. I have a boost multi-index map of ~160k orders. Each order has a map of boost variants. Each map has probably ~50 elements. Most of the variant types are about 16 bytes except for strings, and those are shared pointers to C strings (I would have used standard strings, but I was overruled).
I'm running through my list of orders and calling map::clear on all of them, and within the call to clear I've been hung by RtlpFreeHeap. Specifically RtlpDecommitBlock, which was called by RtlDeCommitFreeBlock, which was called by RtlFreeHeap.
This is a problem I see when I have a large number of order objects. All these objects are valid memory, so I don't consider I'm calling clear on some garbage address. The offending call is in ntdll, so I don't have source code to see what's up. Going down the stack, I find the last call the debugger can inspect is _free_base, and HeapFree was called with:
HeapFree(0x0000000000510000, 0, 0x000000016d7cf9e0);
But I don't suspect that's particularly telling. Has anyone else seen this? Any ideas how I might further diagnose why I'm hanging here?