Lines Matching refs:heap

338 void* OSAllocFromHeap(OSHeapHandle heap, u32 size)  in OSAllocFromHeap()  argument
351 ASSERTMSG(0 <= heap && heap < NumHeaps, OS_ERR_ALLOCFROMHEAP_INVHEAP); in OSAllocFromHeap()
352 ASSERTMSG(0 <= HeapArray[heap].size, OS_ERR_ALLOCFROMHEAP_INVHEAP); in OSAllocFromHeap()
354 hd = &HeapArray[heap]; in OSAllocFromHeap()
584 void OSFreeToHeap(OSHeapHandle heap, void* ptr) in OSFreeToHeap() argument
593 ASSERTMSG(0 <= HeapArray[heap].size, OS_ERR_FREETOHEAP_INVHEAP); in OSFreeToHeap()
596 hd = &HeapArray[heap]; in OSFreeToHeap()
627 OSHeapHandle OSSetCurrentHeap(OSHeapHandle heap) in OSSetCurrentHeap() argument
632 ASSERTMSG(0 <= heap && heap < NumHeaps, OS_ERR_SETCURRENTHEAP_INVHEAP); in OSSetCurrentHeap()
633 ASSERTMSG(0 <= HeapArray[heap].size, OS_ERR_SETCURRENTHEAP_INVHEAP); in OSSetCurrentHeap()
635 __OSCurrHeap = heap; in OSSetCurrentHeap()
713 OSHeapHandle heap; in OSCreateHeap() local
730 for (heap = 0; heap < NumHeaps; heap++) in OSCreateHeap()
732 if (HeapArray[heap].size < 0) in OSCreateHeap()
734 ASSERTMSG(!DLOverlap(HeapArray[heap].free, start, end), in OSCreateHeap()
736 ASSERTMSG(!DLOverlap(HeapArray[heap].allocated, start, end), in OSCreateHeap()
742 for (heap = 0; heap < NumHeaps; heap++) in OSCreateHeap()
744 hd = &HeapArray[heap]; in OSCreateHeap()
763 return heap; in OSCreateHeap()
787 void OSDestroyHeap(OSHeapHandle heap) in OSDestroyHeap() argument
795 ASSERTMSG(0 <= heap && heap < NumHeaps, OS_ERR_DESTROYHEAP_INVHEAP); in OSDestroyHeap()
796 ASSERTMSG(0 <= HeapArray[heap].size, OS_ERR_DESTROYHEAP_INVHEAP); in OSDestroyHeap()
798 hd = &HeapArray[heap]; in OSDestroyHeap()
806 heap, size, hd->size); in OSDestroyHeap()
815 if (__OSCurrHeap == heap) in OSDestroyHeap()
834 void OSAddToHeap(OSHeapHandle heap, void* start, void* end) in OSAddToHeap() argument
843 ASSERTMSG(0 <= heap && heap < NumHeaps, OS_ERR_ADDTOHEAP_INVHEAP); in OSAddToHeap()
844 ASSERTMSG(0 <= HeapArray[heap].size, OS_ERR_ADDTOHEAP_INVHEAP); in OSAddToHeap()
846 hd = &HeapArray[heap]; in OSAddToHeap()
903 long OSCheckHeap(OSHeapHandle heap) in OSCheckHeap() argument
911 CHECK(0 <= heap && heap < NumHeaps); in OSCheckHeap()
913 hd = &HeapArray[heap]; in OSCheckHeap()
1000 void OSDumpHeap(OSHeapHandle heap) in OSDumpHeap() argument
1005 OSReport("\nOSDumpHeap(%d):\n", heap); in OSDumpHeap()
1008 ASSERTMSG(0 <= heap && heap < NumHeaps, OS_ERR_DUMPHEAP_INVHEAP); in OSDumpHeap()
1010 hd = &HeapArray[heap]; in OSDumpHeap()
1017 ASSERTMSG(0 <= OSCheckHeap(heap), OS_ERR_DUMPHEAP_BROKENHEAP); in OSDumpHeap()
1068 u32 heap; in OSVisitAllocated() local
1071 for (heap = 0; heap < NumHeaps; heap++) in OSVisitAllocated()
1073 if (HeapArray[heap].size >= 0) in OSVisitAllocated()
1075 for (cell = HeapArray[heap].allocated; cell; cell = cell->next) in OSVisitAllocated()