Lines Matching defs:iHeap
121 uint32_t iHeap = g_cSupR3HardenedEarlyHeaps;
122 while (iHeap-- > 0)
123 if ((uintptr_t)pv - (uintptr_t)g_aSupR3HardenedEarlyHeaps[iHeap].pvBlock < g_aSupR3HardenedEarlyHeaps[iHeap].cbBlock)
124 return iHeap;
131 uint32_t iHeap = g_cSupR3HardenedEarlyHeaps;
132 while (iHeap-- > 0)
133 if (g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations == 0)
135 PVOID pvMem = g_aSupR3HardenedEarlyHeaps[iHeap].pvBlock;
136 SIZE_T cbMem = g_aSupR3HardenedEarlyHeaps[iHeap].cbBlock;
137 if (iHeap + 1 < g_cSupR3HardenedEarlyHeaps)
138 g_aSupR3HardenedEarlyHeaps[iHeap] = g_aSupR3HardenedEarlyHeaps[g_cSupR3HardenedEarlyHeaps - 1];
143 SUP_DPRINTF(("supR3HardenedEarlyCompact: Removed heap %#u (%#p LB %#zx)\n", iHeap, pvMem, cbMem));
154 uint32_t iHeap = 0;
155 while (iHeap < g_cSupR3HardenedEarlyHeaps)
158 pv = RTHeapSimpleAllocZ(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, cb, 0);
160 pv = RTHeapSimpleAlloc(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, cb, 0);
163 g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations++;
169 iHeap++;
175 if (iHeap == RT_ELEMENTS(g_aSupR3HardenedEarlyHeaps))
177 SIZE_T cbBlock = iHeap == 0 ? _1M : g_aSupR3HardenedEarlyHeaps[iHeap - 1].cbBlock * 2;
185 SUP_DPRINTF(("New simple heap: #%u %p LB %#zx (for %zu allocation)\n", iHeap, pvBlock, cbBlock, cb));
199 g_aSupR3HardenedEarlyHeaps[iHeap].pvBlock = pvBlock;
200 g_aSupR3HardenedEarlyHeaps[iHeap].cbBlock = cbBlock;
201 g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations = 1;
202 g_aSupR3HardenedEarlyHeaps[iHeap].hHeap = hHeap;
204 Assert(g_cSupR3HardenedEarlyHeaps == iHeap);
205 g_cSupR3HardenedEarlyHeaps = iHeap + 1;
332 uint32_t iHeap = supR3HardenedEarlyFind(pvOld);
333 if (iHeap != UINT32_MAX)
341 pv = RTHeapSimpleRealloc(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, pvOld, cbNew, 0);
355 size_t cbOld = RTHeapSimpleSize(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, pvOld);
360 RTHeapSimpleFree(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, pvOld);
361 if (g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations)
362 g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations--;
363 if ( !g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations
391 uint32_t iHeap = supR3HardenedEarlyFind(pv);
392 if (iHeap != UINT32_MAX)
397 RTHeapSimpleFree(g_aSupR3HardenedEarlyHeaps[iHeap].hHeap, pv);
398 if (g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations)
399 g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations--;
400 if ( !g_aSupR3HardenedEarlyHeaps[iHeap].cAllocations