HeapWalk and PROCESS_HEAP_ENTRY_MOVEABLE
-
Has anyone ever seen the PROCESS_HEAP_ENTRY_MOVEABLE bit set in any of the heap entries encountered while walking a heap? I have allocated some memory using GlobalAlloc(GMEM_MOVEABLE, nBlockSize); where nBlockSize = 65 * 1024. When I call HeapWalk and iteratively obtain the PROCESS_HEAP_ENTRY data, I never see the PROCESS_HEAP_ENTRY_MOVEABLE bit set in any of the heap entries. I used GetProcessHeaps and separately walked each of the 3 heaps my test program has in it. The entire reason this is an issue is that a process is only allowed 65535 GMEM_MOVEABLE allocations at one time (according to a couple Microsoft documents), and our product is reaching this limit. I want to periodically check, for QA purposes, how many handles have already been used.