Merge branch 'master' into iso-9660
[lunaix-os.git] / lunaix-os / kernel / mm / region.c
index 1f706dc362140c5203a36b9371b04571b8f492b1..bd3b26ec0d5fc1009b0e9cf424869934816d2c03 100644 (file)
@@ -1,5 +1,5 @@
-#include <lunaix/mm/kalloc.h>
 #include <lunaix/mm/region.h>
 #include <lunaix/mm/region.h>
+#include <lunaix/mm/valloc.h>
 
 void
 region_add(struct mm_region* regions,
 
 void
 region_add(struct mm_region* regions,
@@ -7,7 +7,7 @@ region_add(struct mm_region* regions,
            unsigned long end,
            unsigned int attr)
 {
            unsigned long end,
            unsigned int attr)
 {
-    struct mm_region* region = lxmalloc(sizeof(struct mm_region));
+    struct mm_region* region = valloc(sizeof(struct mm_region));
 
     *region = (struct mm_region){ .attr = attr, .end = end, .start = start };
 
 
     *region = (struct mm_region){ .attr = attr, .end = end, .start = start };
 
@@ -21,7 +21,7 @@ region_release_all(struct mm_region* regions)
 
     llist_for_each(pos, n, &regions->head, head)
     {
 
     llist_for_each(pos, n, &regions->head, head)
     {
-        lxfree(pos);
+        vfree(pos);
     }
 }
 
     }
 }