Browse Source

Add some comments on sys_alloc()

Ioannis Koutras 13 years ago
parent
commit
fe3a2c709d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/sys_alloc.c

+ 2 - 0
src/sys_alloc.c

@@ -77,9 +77,11 @@ void *sys_alloc(allocator_t *allocator, heap_t *heap, size_t size) {
     }
 
 #ifndef WITH_MEMORY_SPACE_AWARENESS
+    // TODO Make the page size configurable at design time
     if(size + HEADER_SIZE < 4096) {
         allocation_size = 4096;
     } else {
+        /* If allocation size is more than 4k, then request multiples of 4k */
         allocation_size = ((size + HEADER_SIZE) / 4096 + 1) * 4096;
     }
 #ifdef WITH_MMAP