summaryrefslogtreecommitdiffstats
path: root/mem/memory.h
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/memory.h
parentf46ab8ca2050ee77edf6e6b979875426bdaf29dc (diff)
downloadjove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.tar.gz
jove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.tar.bz2
jove-kernel-dd5d9e1d48396cbc226ff14fe557a55613c91fcb.zip
better buddy memory allocator
Diffstat (limited to 'mem/memory.h')
-rw-r--r--mem/memory.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/mem/memory.h b/mem/memory.h
index 3956852..41323ed 100644
--- a/mem/memory.h
+++ b/mem/memory.h
@@ -32,12 +32,12 @@ bool mem_check_ptr(const void *ptr);
* @param user flag to mark page as user accessable*/
void mem_ensure_range(uintptr_t from, uintptr_t to, bool rw, bool user);
-/**Make sure the range indicated is available in memory for specified pd
+/** Make sure the range indicated is available in memory for specified pd
* If necessary, allocate new pages using the passed flags
* @param pd pointer to page directory to edit
- * @param from start of the range.
- * @param to end of the range.
- * @param rw flag to mark page is writeable.
+ * @param from start of the range
+ * @param to end of the range
+ * @param rw flag to mark page is writeable
* @param user flag to mark page as user accessable*/
void mem_ensure_range_for(void *pd, uintptr_t from, uintptr_t to, bool rw, bool user);
@@ -52,7 +52,9 @@ void mem_free(void *ptr);
/*Physical*/
-physptr_t mem_phys_take4k(void);
+physptr_t mem_phys_alloc(size_t pages);
void mem_phys_reserve(physptr_t start, size_t len);
+void mem_setup(void);
+
#endif