Lines Matching refs:heapInfo

362     OSHeapInfo *heapInfo;  in OS_AllocFromHeap()  local
378 heapInfo = OSiHeapInfo[id]; in OS_AllocFromHeap()
381 if (!heapInfo) in OS_AllocFromHeap()
390 heap = heapInfo->currentHeap; in OS_AllocFromHeap()
393 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_ALLOCFROMHEAP_NOHEAP); in OS_AllocFromHeap()
395 SDK_TASSERTMSG(0 <= heap && heap < heapInfo->numHeaps, OS_ERR_ALLOCFROMHEAP_INVHEAP); in OS_AllocFromHeap()
396 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, OS_ERR_ALLOCFROMHEAP_INVHEAP); in OS_AllocFromHeap()
398 hd = &heapInfo->heapArray[heap]; in OS_AllocFromHeap()
496 OSHeapInfo *heapInfo; in OS_AllocFixed() local
508 heapInfo = OSiHeapInfo[id]; in OS_AllocFixed()
510 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_ALLOCFIXED_NOHEAP); in OS_AllocFixed()
512 …SDK_TASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), OS_ERR_ALLOCFIXE… in OS_AllocFixed()
515 for (i = 0; i < heapInfo->numHeaps; i++) in OS_AllocFixed()
517 hd = &heapInfo->heapArray[i]; in OS_AllocFixed()
541 for (i = 0; i < heapInfo->numHeaps; i++) in OS_AllocFixed()
544 hd = &heapInfo->heapArray[i]; in OS_AllocFixed()
675 OSHeapInfo *heapInfo; in OS_FreeToHeap() local
684 heapInfo = OSiHeapInfo[id]; in OS_FreeToHeap()
688 heap = heapInfo->currentHeap; in OS_FreeToHeap()
691 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_FREETOHEAP_NOHEAP); in OS_FreeToHeap()
697 …SDK_TASSERTMSG(InRange(ptr, (char *)heapInfo->arenaStart + HEADERSIZE, (char *)heapInfo->arenaEnd)… in OS_FreeToHeap()
703 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, OS_ERR_FREETOHEAP_INVHEAP); in OS_FreeToHeap()
706 hd = &heapInfo->heapArray[heap]; in OS_FreeToHeap()
739 OSHeapInfo *heapInfo; in OS_FreeAllToHeap() local
748 heapInfo = OSiHeapInfo[id]; in OS_FreeAllToHeap()
752 heap = heapInfo->currentHeap; in OS_FreeAllToHeap()
755 SDK_TASSERTMSG(heapInfo->heapArray, "heap not initialized"); in OS_FreeAllToHeap()
756 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, "invalid heap handle"); in OS_FreeAllToHeap()
758 hd = &heapInfo->heapArray[heap]; in OS_FreeAllToHeap()
795 OSHeapInfo *heapInfo; in OS_SetCurrentHeap() local
802 heapInfo = OSiHeapInfo[id]; in OS_SetCurrentHeap()
804 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_SETCURRENTHEAP_NOHEAP); in OS_SetCurrentHeap()
805 SDK_TASSERTMSG(0 <= heap && heap < heapInfo->numHeaps, OS_ERR_SETCURRENTHEAP_INVHEAP); in OS_SetCurrentHeap()
806 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, OS_ERR_SETCURRENTHEAP_INVHEAP); in OS_SetCurrentHeap()
807 prev = heapInfo->currentHeap; in OS_SetCurrentHeap()
808 heapInfo->currentHeap = heap; in OS_SetCurrentHeap()
832 OSHeapInfo *heapInfo; in OS_InitAlloc() local
846 heapInfo = arenaStart; in OS_InitAlloc()
847 OSiHeapInfo[id] = heapInfo; in OS_InitAlloc()
851 heapInfo->heapArray = (void *)((u32)arenaStart + sizeof(OSHeapInfo)); in OS_InitAlloc()
852 heapInfo->numHeaps = maxHeaps; in OS_InitAlloc()
854 for (i = 0; i < heapInfo->numHeaps; i++) in OS_InitAlloc()
856 HeapDesc *hd = &heapInfo->heapArray[i]; in OS_InitAlloc()
866 heapInfo->currentHeap = -1; in OS_InitAlloc()
869 arenaStart = (void *)((char *)heapInfo->heapArray + arraySize); in OS_InitAlloc()
872 heapInfo->arenaStart = arenaStart; in OS_InitAlloc()
873 heapInfo->arenaEnd = (void *)TRUNC(arenaEnd, ALIGNMENT); in OS_InitAlloc()
874 …SDK_TASSERTMSG(MINOBJSIZE <= (char *)heapInfo->arenaEnd - (char *)heapInfo->arenaStart, OS_ERR_INI… in OS_InitAlloc()
877 return heapInfo->arenaStart; in OS_InitAlloc()
913 OSHeapInfo *heapInfo; in OS_CreateHeap() local
924 heapInfo = OSiHeapInfo[id]; in OS_CreateHeap()
926 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_CREATEHEAP_NOHEAP); in OS_CreateHeap()
931 …SDK_TASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), OS_ERR_CREATEHEA… in OS_CreateHeap()
937 for (heap = 0; heap < heapInfo->numHeaps; heap++) in OS_CreateHeap()
939 if (heapInfo->heapArray[heap].size < 0) in OS_CreateHeap()
943 …SDK_TASSERTMSG(!DLOverlap(heapInfo->heapArray[heap].free, start, end), OS_ERR_CREATEHEAP_INVRANGE); in OS_CreateHeap()
944 …SDK_TASSERTMSG(!DLOverlap(heapInfo->heapArray[heap].allocated, start, end), OS_ERR_CREATEHEAP_INVR… in OS_CreateHeap()
949 for (heap = 0; heap < heapInfo->numHeaps; heap++) in OS_CreateHeap()
951 hd = &heapInfo->heapArray[heap]; in OS_CreateHeap()
999 OSHeapInfo *heapInfo; in OS_CreateExtraHeap() local
1007 heapInfo = OSiHeapInfo[id]; in OS_CreateExtraHeap()
1008 SDK_TASSERTMSG(heapInfo, OS_ERR_CREATEHEAP_NOINFO); in OS_CreateExtraHeap()
1009 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_CREATEHEAP_NOHEAP); in OS_CreateExtraHeap()
1015 for (heap = 0; heap < heapInfo->numHeaps; heap++) in OS_CreateExtraHeap()
1017 hd = &heapInfo->heapArray[heap]; in OS_CreateExtraHeap()
1064 OSHeapInfo *heapInfo; in OS_DestroyHeap() local
1074 heapInfo = OSiHeapInfo[id]; in OS_DestroyHeap()
1076 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_DESTROYHEAP_NOHEAP); in OS_DestroyHeap()
1077 SDK_TASSERTMSG(0 <= heap && heap < heapInfo->numHeaps, OS_ERR_DESTROYHEAP_INVHEAP); in OS_DestroyHeap()
1078 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, OS_ERR_DESTROYHEAP_INVHEAP); in OS_DestroyHeap()
1080 hd = &heapInfo->heapArray[heap]; in OS_DestroyHeap()
1105 if (heapInfo->currentHeap == heap) in OS_DestroyHeap()
1107 heapInfo->currentHeap = -1; in OS_DestroyHeap()
1130 OSHeapInfo *heapInfo; in OS_AddToHeap() local
1141 heapInfo = OSiHeapInfo[id]; in OS_AddToHeap()
1143 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_ADDTOHEAP_NOHEAP); in OS_AddToHeap()
1144 SDK_TASSERTMSG(0 <= heap && heap < heapInfo->numHeaps, OS_ERR_ADDTOHEAP_INVHEAP); in OS_AddToHeap()
1145 SDK_TASSERTMSG(0 <= heapInfo->heapArray[heap].size, OS_ERR_ADDTOHEAP_INVHEAP); in OS_AddToHeap()
1147 hd = &heapInfo->heapArray[heap]; in OS_AddToHeap()
1160 …SDK_TASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), OS_ERR_ADDTOHEAP… in OS_AddToHeap()
1169 for (i = 0; i < heapInfo->numHeaps; i++) in OS_AddToHeap()
1171 if (heapInfo->heapArray[i].size < 0) in OS_AddToHeap()
1175 … SDK_TASSERTMSG(!DLOverlap(heapInfo->heapArray[i].free, start, end), OS_ERR_ADDTOHEAP_INVRANGE); in OS_AddToHeap()
1176 …SDK_TASSERTMSG(!DLOverlap(heapInfo->heapArray[i].allocated, start, end), OS_ERR_ADDTOHEAP_INVRANGE… in OS_AddToHeap()
1267 OSHeapInfo *heapInfo; in OS_CheckHeap() local
1278 heapInfo = OSiHeapInfo[id]; in OS_CheckHeap()
1283 heap = heapInfo->currentHeap; in OS_CheckHeap()
1287 OSi_CHECK(heapInfo->heapArray); in OS_CheckHeap()
1288 OSi_CHECK(0 <= heap && heap < heapInfo->numHeaps); in OS_CheckHeap()
1290 hd = &heapInfo->heapArray[heap]; in OS_CheckHeap()
1301 OSi_CHECK(InRange(cell, heapInfo->arenaStart, heapInfo->arenaEnd)); in OS_CheckHeap()
1328 OSi_CHECK(InRange(cell, heapInfo->arenaStart, heapInfo->arenaEnd)); in OS_CheckHeap()
1369 OSHeapInfo *heapInfo; in OS_ReferentSize() local
1376 heapInfo = OSiHeapInfo[id]; in OS_ReferentSize()
1378 SDK_TASSERTMSG(heapInfo->heapArray, OS_ERR_REFERENT_NOHEAP); in OS_ReferentSize()
1384 …SDK_TASSERTMSG(InRange(ptr, (char *)heapInfo->arenaStart + HEADERSIZE, (char *)heapInfo->arenaEnd)… in OS_ReferentSize()
1394 …SDK_TASSERTMSG(((char *)cell->hd - (char *)heapInfo->heapArray) % sizeof(HeapDesc) == 0, OS_ERR_RE… in OS_ReferentSize()
1395 …SDK_TASSERTMSG(heapInfo->heapArray <= cell->hd && cell->hd < &heapInfo->heapArray[heapInfo->numHea… in OS_ReferentSize()
1416 OSHeapInfo *heapInfo; in OS_DumpHeap() local
1424 heapInfo = OSiHeapInfo[id]; in OS_DumpHeap()
1426 SDK_TASSERTMSG(heapInfo && heapInfo->heapArray, OS_ERR_DUMPHEAP_NOHEAP); in OS_DumpHeap()
1431 heap = heapInfo->currentHeap; in OS_DumpHeap()
1433 SDK_TASSERTMSG(0 <= heap && heap < heapInfo->numHeaps, OS_ERR_DUMPHEAP_INVHEAP); in OS_DumpHeap()
1435 hd = &heapInfo->heapArray[heap]; in OS_DumpHeap()
1506 OSHeapInfo *heapInfo; in OS_VisitAllocated() local
1515 heapInfo = OSiHeapInfo[id]; in OS_VisitAllocated()
1517 for (heap = 0; heap < heapInfo->numHeaps; heap++) in OS_VisitAllocated()
1519 if (heapInfo->heapArray[heap].size >= 0) in OS_VisitAllocated()
1521 for (cell = heapInfo->heapArray[heap].allocated; cell; cell = cell->next) in OS_VisitAllocated()
1548 OSHeapInfo *heapInfo; in OSi_GetTotalAllocSize() local
1554 heapInfo = OSiHeapInfo[id]; in OSi_GetTotalAllocSize()
1555 SDK_ASSERT(heapInfo); in OSi_GetTotalAllocSize()
1556 SDK_ASSERT(heap < heapInfo->numHeaps); in OSi_GetTotalAllocSize()
1561 heap = heapInfo->currentHeap; in OSi_GetTotalAllocSize()
1566 for (cell = heapInfo->heapArray[heap].allocated; cell; cell = cell->next) in OSi_GetTotalAllocSize()
1573 for (cell = heapInfo->heapArray[heap].allocated; cell; cell = cell->next) in OSi_GetTotalAllocSize()
1597 OSHeapInfo *heapInfo; in OS_GetTotalFreeSize() local
1603 heapInfo = OSiHeapInfo[id]; in OS_GetTotalFreeSize()
1604 SDK_ASSERT(heapInfo); in OS_GetTotalFreeSize()
1605 SDK_ASSERT(heap < heapInfo->numHeaps); in OS_GetTotalFreeSize()
1610 heap = heapInfo->currentHeap; in OS_GetTotalFreeSize()
1613 for (cell = heapInfo->heapArray[heap].free; cell; cell = cell->next) in OS_GetTotalFreeSize()
1635 OSHeapInfo *heapInfo; in OS_GetMaxFreeSize() local
1641 heapInfo = OSiHeapInfo[id]; in OS_GetMaxFreeSize()
1642 SDK_ASSERT(heapInfo); in OS_GetMaxFreeSize()
1643 SDK_ASSERT(heap < heapInfo->numHeaps); in OS_GetMaxFreeSize()
1648 heap = heapInfo->currentHeap; in OS_GetMaxFreeSize()
1651 for (cell = heapInfo->heapArray[heap].free; cell; cell = cell->next) in OS_GetMaxFreeSize()
1682 OSHeapInfo *heapInfo; in OS_ClearHeap() local
1691 heapInfo = OSiHeapInfo[id]; in OS_ClearHeap()
1693 SDK_TASSERTMSG(heapInfo && heapInfo->heapArray, "heap not initialized"); in OS_ClearHeap()
1703 …SDK_TASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), "invalid range"); in OS_ClearHeap()
1713 heap = heapInfo->currentHeap; in OS_ClearHeap()
1717 hd = &heapInfo->heapArray[heap]; in OS_ClearHeap()