X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibc.so_src%2Fheap.c;h=bdf64de35fdc635674f8b91f55409dd401e17d3c;hb=8695e2b9f65ab4411677d4eff57d0d80f6c26f9a;hp=779b0048d44938a80dbae3c058e93db9e85ac064;hpb=8dcc3e209d0d728565a18c8dca2b0ba220b74a6f;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/heap.c b/Usermode/Libraries/libc.so_src/heap.c index 779b0048..bdf64de3 100644 --- a/Usermode/Libraries/libc.so_src/heap.c +++ b/Usermode/Libraries/libc.so_src/heap.c @@ -185,7 +185,7 @@ EXPORT void free(void *mem) DEBUGS("free(%p) : 0x%x bytes", mem, head->size); //Unify Right - if((intptr_t)head + head->size < (intptr_t)_heap_end) + if((uintptr_t)head + head->size < (uintptr_t)_heap_end) { heap_head *nextHead = (heap_head*)((intptr_t)head + head->size); if(nextHead->magic == MAGIC_FREE) { //Is the next block free @@ -194,7 +194,7 @@ EXPORT void free(void *mem) } } //Unify Left - if((intptr_t)head - sizeof(heap_foot) > (intptr_t)_heap_start) + if((uintptr_t)head - sizeof(heap_foot) > (uintptr_t)_heap_start) { heap_head *prevHead; heap_foot *prevFoot = (heap_foot *)((intptr_t)head - sizeof(heap_foot)); @@ -448,7 +448,7 @@ LOCAL uint brk(uintptr_t newpos) void Heap_Dump(void) { heap_head *cur = _heap_start; - while( cur < _heap_end ) + while( cur < (heap_head*)_heap_end ) { switch( cur->magic ) {