Lines Matching refs:end

307 static BOOL DLOverlap(Cell * list, void *start, void *end)  in DLOverlap()  argument
313 if (RangeOverlap(cell, (char *)cell + cell->size, start, end)) in DLOverlap()
498 void *end = (void *)ROUND(*rend, ALIGNMENT); in OS_AllocFixed() local
507 SDK_ASSERTMSG(start < end, OS_ERR_ALLOCFIXED_INVRANGE); in OS_AllocFixed()
508 SDK_ASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), in OS_AllocFixed()
520 if (DLOverlap(hd->allocated, start, end)) in OS_AllocFixed()
523 OS_Printf("OS_AllocFixed: Warning - failed to allocate from %p to %p\n", start, end); in OS_AllocFixed()
557 if ((char *)end <= (char *)cell) in OS_AllocFixed()
562 if (InRange(cell, (char *)start - HEADERSIZE, end) && in OS_AllocFixed()
563 InRange((char *)cellEnd, start, (char *)end + MINOBJSIZE)) in OS_AllocFixed()
567 if ((char *)end < (char *)cellEnd) in OS_AllocFixed()
568 end = (void *)cellEnd; in OS_AllocFixed()
576 if (InRange(cell, (char *)start - HEADERSIZE, end)) in OS_AllocFixed()
586 SDK_ASSERT(MINOBJSIZE <= (char *)cellEnd - (char *)end); in OS_AllocFixed()
587 newCell = (Cell *) end; in OS_AllocFixed()
588 newCell->size = (char *)cellEnd - (char *)end; in OS_AllocFixed()
606 hd->size -= (char *)end - (char *)cell; in OS_AllocFixed()
610 if (InRange((char *)cellEnd, start, (char *)end + MINOBJSIZE)) in OS_AllocFixed()
612 if ((char *)end < (char *)cellEnd) in OS_AllocFixed()
614 end = (void *)cellEnd; in OS_AllocFixed()
625 SDK_ASSERT(MINOBJSIZE <= (char *)cellEnd - (char *)end); in OS_AllocFixed()
626 newCell = (Cell *) end; in OS_AllocFixed()
627 newCell->size = (char *)cellEnd - (char *)end; in OS_AllocFixed()
639 hd->size -= (char *)end - (char *)start; in OS_AllocFixed()
646 SDK_ASSERT(OFFSET(end, ALIGNMENT) == 0); in OS_AllocFixed()
647 SDK_ASSERT(start < end); in OS_AllocFixed()
649 *rend = end; in OS_AllocFixed()
900 OSHeapHandle OS_CreateHeap(OSArenaId id, void *start, void *end) in OS_CreateHeap() argument
916 SDK_ASSERTMSG(start < end, OS_ERR_CREATEHEAP_INVRANGE); in OS_CreateHeap()
918 end = (void *)TRUNC(end, ALIGNMENT); in OS_CreateHeap()
919 SDK_ASSERTMSG(start < end, OS_ERR_CREATEHEAP_INVRANGE); in OS_CreateHeap()
920 SDK_ASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), in OS_CreateHeap()
922 SDK_ASSERTMSG(MINOBJSIZE <= (char *)end - (char *)start, OS_ERR_CREATEHEAP_INSRANGE); in OS_CreateHeap()
933 SDK_ASSERTMSG(!DLOverlap(heapInfo->heapArray[heap].free, start, end), in OS_CreateHeap()
935 SDK_ASSERTMSG(!DLOverlap(heapInfo->heapArray[heap].allocated, start, end), in OS_CreateHeap()
946 hd->size = (char *)end - (char *)start; in OS_CreateHeap()
1046 void OS_AddToHeap(OSArenaId id, OSHeapHandle heap, void *start, void *end) in OS_AddToHeap() argument
1067 SDK_ASSERTMSG(start < end, OS_ERR_ADDTOHEAP_INVRANGE); in OS_AddToHeap()
1069 end = (void *)TRUNC(end, ALIGNMENT); in OS_AddToHeap()
1070 SDK_ASSERTMSG(MINOBJSIZE <= (char *)end - (char *)start, OS_ERR_ADDTOHEAP_INSRANGE); in OS_AddToHeap()
1071 SDK_ASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), in OS_AddToHeap()
1083 SDK_ASSERTMSG(!DLOverlap(heapInfo->heapArray[i].free, start, end), in OS_AddToHeap()
1085 SDK_ASSERTMSG(!DLOverlap(heapInfo->heapArray[i].allocated, start, end), in OS_AddToHeap()
1092 cell->size = (char *)end - (char *)start; in OS_AddToHeap()
1537 void OS_ClearHeap(OSArenaId id, OSHeapHandle heap, void *start, void *end) in OS_ClearHeap() argument
1551 SDK_ASSERTMSG(start < end, "invalid range"); in OS_ClearHeap()
1553 end = (void *)TRUNC(end, ALIGNMENT); in OS_ClearHeap()
1554 SDK_ASSERTMSG(start < end, "invalid range"); in OS_ClearHeap()
1555 SDK_ASSERTMSG(RangeSubset(start, end, heapInfo->arenaStart, heapInfo->arenaEnd), in OS_ClearHeap()
1557 SDK_ASSERTMSG(MINOBJSIZE <= (char *)end - (char *)start, "too small range"); in OS_ClearHeap()
1567 hd->size = (char *)end - (char *)start; in OS_ClearHeap()