Browse Source

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

Ioannis Koutras 14 years ago
parent
commit
06bfbf6e8e
1 changed files with 1 additions and 1 deletions
  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 {