Browse Source

Explain why we need 12 * sizeof(MAPTABLE_NODE)

Ioannis Koutras 13 years ago
parent
commit
adfe7011a2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      dmm_init.c

+ 2 - 0
dmm_init.c

@@ -24,8 +24,10 @@ allocator_t *dmm_init(void) {
 	// Custom number of fixed lists and their initialization
 	// 2 first ones with 32, 64, 128 and 256 (4 fixed lists per heap)
 	// 2 last ones with 64 and 256 (2 fixed lists per heap)
+	// 2 * 4 + 2 * 2 = 12 maptable nodes
 	current_heap = &main_allocator->heaps[0];
 	maptablenode = (MAPTABLE_NODE *) sbrk(12*(sizeof(MAPTABLE_NODE)));
+
 	maptablenode->size = 32;
 	maptablenode->fixed_list_head = NULL;
 	maptablenode->next = maptablenode+1;