|
@@ -15,6 +15,9 @@ void *sys_alloc(heap_t *heap, size_t size) {
|
|
|
allocation_size = req_padding(size) + HEADER_SIZE;
|
|
|
|
|
|
ptr = sbrk((int) allocation_size);
|
|
|
+ if(ptr == (void *) -1) {
|
|
|
+ printf("sbrk problem for size of: %d\n", allocation_size);
|
|
|
+ }
|
|
|
ptr = (void *) ((char *) ptr + HEADER_SIZE);
|
|
|
|
|
|
set_size(ptr, req_padding(size));
|