소스 검색

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

Ioannis Koutras 14 년 전
부모
커밋
06bfbf6e8e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 {