X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibc.so_src%2Fheap.c;h=4fcc8bed3a5b446d3a2bda1e6b8a10af1ac8ebef;hb=71b1271511ad01f042d2e51673dd57cce1b0fd9c;hp=7ce6bca872ce0123cfccefa239c10ab2bc4b1e94;hpb=8a8a744341df513d00d2e60adf5e88636856e65b;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/heap.c b/Usermode/Libraries/libc.so_src/heap.c index 7ce6bca8..4fcc8bed 100644 --- a/Usermode/Libraries/libc.so_src/heap.c +++ b/Usermode/Libraries/libc.so_src/heap.c @@ -54,6 +54,7 @@ EXPORT void *malloc(size_t bytes) void *bestMatchAddr = 0; heap_head *curBlock; +// _SysDebug("&_heap_start = %p, _heap_start = %p", &_heap_start, _heap_start); // Initialise Heap if(_heap_start == NULL) { @@ -63,6 +64,7 @@ EXPORT void *malloc(size_t bytes) } curBlock = _heap_start; +// _SysDebug("_heap_start = %p", _heap_start); bestSize = bytes + sizeof(heap_head) + sizeof(heap_foot) + BLOCK_SIZE - 1; bestSize = (bestSize/BLOCK_SIZE)*BLOCK_SIZE; //Round up to block size