瀏覽代碼

Add some comments on sys_alloc()

Ioannis Koutras 13 年之前
父節點
當前提交
fe3a2c709d
共有 1 個文件被更改,包括 2 次插入0 次删除
  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