summaryrefslogtreecommitdiffstats
path: root/mem/phys.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-03-15 13:16:02 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-03-15 13:16:02 -0400
commitdd5d9e1d48396cbc226ff14fe557a55613c91fcb (patch)
treeb0ec9f54b80f26777ac08b723b42c1c64c5a2bda /mem/phys.c
parentf46ab8ca2050ee77edf6e6b979875426bdaf29dc (diff)
downloadjove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.tar.gz
jove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.tar.bz2
jove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.zip
better buddy memory allocator
Diffstat (limited to 'mem/phys.c')
-rw-r--r--mem/phys.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/mem/phys.c b/mem/phys.c
index e56a4d6..00f3531 100644
--- a/mem/phys.c
+++ b/mem/phys.c
@@ -1,14 +1,9 @@
#include "memory.h"
-#include "buddymap.h"
+#include "zone.h"
physptr_t
-mem_phys_take4k(void)
+mem_phys_alloc(size_t pages)
{
- return mem_buddy_takefree_4k();
-}
-
-void
-mem_phys_reserve(physptr_t start, size_t len)
-{
- mem_buddy_set_range(start, len);
+ physptr_t ptr = mem_zone_alloc(MEM_ZONE_STANDARD, pages);
+ return ptr;
}