system.c
void *AllocateLowMemory(System *sys, size_t size)
{
    uint8_t *p = sys->nextLow;
    size = (size + ALIGN_MASK) & ~ALIGN_MASK;
    if (p + size > sys->nextHigh)
        Abort(sys, "insufficient memory");
    sys->nextLow += size;
    if (sys->heapSize - (sys->nextHigh - sys->nextLow) > sys->maxHeapUsed)
        sys->maxHeapUsed = sys->heapSize - (sys->nextHigh - sys->nextLow);
    return p;
}
/* AllocateLowMemory - allocate low memory from the heap */
allocate low memory from the heap
allocate low memory from the heap
void *AllocateLowMemory(System *sys, size_t size)
{
    uint8_t *p = sys->nextLow;
    size = (size + ALIGN_MASK) & ~ALIGN_MASK;
    if (p + size > sys->nextHigh)
        Abort(sys, "insufficient memory");
    sys->nextLow += size;
    if (sys->heapSize - (sys->nextHigh - sys->nextLow) > sys->maxHeapUsed)
        sys->maxHeapUsed = sys->heapSize - (sys->nextHigh - sys->nextLow);
    return p;
}
void * AllocateLowMemory ( System * sys , size_t size ) { uint8_t * p = sys -> nextLow ; size = ( size + ALIGN_MASK ) & ~ ALIGN_MASK ; if ( p + size > sys -> nextHigh ) Abort ( sys , " " ) ; sys -> nextLow += size ; if ( sys -> heapSize - ( sys -> nextHigh - sys -> nextLow ) > sys -> maxHeapUsed ) sys -> maxHeapUsed = sys -> heapSize - ( sys -> nextHigh - sys -> nextLow ) ; return p ; }
AllocateLowMemory - allocate low memory from the heap
AllocateLowMemory - allocate low memory from the heap