Lines Matching refs:pHeap
197 int HGSMIHeapSetup(HGSMIHEAP *pHeap,
203 HGSMI_ASSERT_PTR_RETURN(pHeap, VERR_INVALID_PARAMETER);
206 int rc = HGSMIAreaInitialize(&pHeap->area, pvBase, cbArea, offBase);
209 rc = HGSMIMAInit(&pHeap->ma, &pHeap->area, NULL, 0, 0, pEnv);
212 HGSMIAreaClear(&pHeap->area);
219 void HGSMIHeapDestroy(HGSMIHEAP *pHeap)
221 if (pHeap)
223 HGSMIMAUninit(&pHeap->ma);
224 memset(pHeap, 0, sizeof(*pHeap));
228 void *HGSMIHeapAlloc(HGSMIHEAP *pHeap,
234 HGSMIBUFFERHEADER *pHeader = (HGSMIBUFFERHEADER *)HGSMIHeapBufferAlloc(pHeap, cbAlloc);
237 HGSMIOFFSET offBuffer = HGSMIBufferInitializeSingle(HGSMIHeapArea(pHeap), pHeader,
241 HGSMIHeapBufferFree(pHeap, pHeader);
249 void HGSMIHeapFree(HGSMIHEAP *pHeap,
255 HGSMIHeapBufferFree(pHeap, pHeader);
259 void *HGSMIHeapBufferAlloc(HGSMIHEAP *pHeap,
262 void *pvBuf = HGSMIMAAlloc(&pHeap->ma, cbBuffer);
266 void HGSMIHeapBufferFree(HGSMIHEAP *pHeap,
269 HGSMIMAFree(&pHeap->ma, pvBuf);