I am searching for a way to find a mapping between a heap and the module which owns the heap. I retrieve the heaps in the following way:
HANDLE heaps[1025];
DWORD nheaps = GetProcessHeaps((sizeof(heaps) / sizeof(HANDLE)) - 1, heaps);
for (DWORD i = 0; i < nheaps; ++i) {
// find module which created for heap
// ...
}
The reason why i want to do that is that in my application i find round about 40 heaps, some are standard heaps, other are low-fragmentation heaps. Now i am trying to figure out which module uses which kind of heap.
Thanks a lot!
According to the MSDN docs, the GetProcessHeaps call given you the handles for all heaps in your current process, not all heaps in the system so there is no mapping to other processes.
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