you know how you can use gflags wih +ust to get the call stack paired with each allocation. you can then use !heap in windbg to diagnose leaks?
I want to do this with large allocations made through VirtualAlloc. As far as I can tell VirtualAlloc bypasses the gflags/!heap extensions?
I'm hoping someone can confirm
a) !heap walks the list of allocated memory in each heap - but not the allocated memory that came from VirtualAlloc
b) when you allocate a huge chunk of memory via new/malloc that goes to LocalAlloc() and then to VirtualAlloc() where it bypasses the call stack logging
I'm really hoping someone can assist me in debugging this sort of leak. if the allocations were smaller I'd have no trouble with !heap
You can try LeakDiag which works on a number of different types of memory including memory originiating from VirtualAlloc.
The heap functions operate at a higher level than the Virtual*
functions; in fact, the heap must call VirtualAlloc to add more memory to the process address space. !heap
isn't going to help you with Virtual*
calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With