I’m using VirtualQuery to go through virtual space of my application. But I’d like to identify everything allocated by application, not just my exe – something like SysInternals’ VMmap application – And I need to know which pages belong to which file (I need to identify pages allocated for my application and dlls). How to achieve this?
I’m using VirtualQuery to go through virtual space of my application. But I’d like
Share
You can use CreateToolhelp32Snapshot with TH32CS_SNAPMODULE to retrieve modules base addresses and sizes. For heap, you get use GetProcessHeaps() and HeapWalk() to get different heap regions (both committed and reserved).
Other things (thread stacks, mapped memory) seem harder to retrieve.