reduce the size of ppage by 8 bytes using signly linked list
[lunaix-os.git] / lunaix-os / includes / lunaix / mm / pmm.h
index 60a5c68a4b634b339afc5bb88216163e4380fd83..c0e08b28ab16467adddb198e4f521be833537b04 100644 (file)
@@ -25,18 +25,18 @@ struct pmem_pool
     struct ppage* pool_start;
     struct ppage* pool_end;
     
-#if defined(CONFIG_PMALLOC_NCONTIG)
+#if defined(CONFIG_PMALLOC_METHOD_NCONTIG)
 
     struct llist_header idle_page;
     struct llist_header busy_page;
     
-#elif defined(CONFIG_PMALLOC_BUDDY)
+#elif defined(CONFIG_PMALLOC_METHOD_BUDDY)
 
     struct llist_header idle_order[MAX_PAGE_ORDERS];
     
-#elif defined(CONFIG_PMALLOC_SIMPLE)
+#elif defined(CONFIG_PMALLOC_METHOD_SIMPLE)
 
-    struct llist_header idle_order[MAX_PAGE_ORDERS];
+    struct list_head idle_order[MAX_PAGE_ORDERS];
     int count[MAX_PAGE_ORDERS];
 
 #endif
@@ -87,7 +87,7 @@ ppage_addr(struct ppage* page) {
 
 static inline unsigned int
 count_order(size_t page_count) {
-    unsigned int po = ILOG2(page_count);
+    unsigned int po = ilog2(page_count);
     assert(!(page_count % (1 << po)));
     return po;
 }