Explorar o código

Fixed a wrong call to sbrk while initializing the maptables of a heap on a space aware allocator.

Ioannis Koutras %!s(int64=14) %!d(string=hai) anos
pai
achega
06bfbf6e8e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/initialize_allocator.c

+ 1 - 1
src/initialize_allocator.c

@@ -48,7 +48,7 @@ void initialize_allocator(allocator_t *allocator) {
     maptablenode = (maptable_node_t *) sbrk((int)(12*(sizeof(maptable_node_t))));
 #else
     if(12*(sizeof(maptable_node_t)) < size) {
-        maptablenode = (maptable_node_t *) sbrk((int)(12*(sizeof(maptable_node_t))));
+        maptablenode = (maptable_node_t *) starting_address;
         allocator->border_ptr = starting_address + 12*(sizeof(maptable_node_t));
         allocator->remaining_size = size - 12*(sizeof(maptable_node_t));
     } else {