summaryrefslogtreecommitdiff
path: root/src/kernel/malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/malloc.h')
-rw-r--r--src/kernel/malloc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kernel/malloc.h b/src/kernel/malloc.h
index 436d899..bda2745 100644
--- a/src/kernel/malloc.h
+++ b/src/kernel/malloc.h
@@ -3,10 +3,12 @@
#include <shared/mem.h>
#include <stddef.h>
-/* This seems to be fine for now, and it means that i don't need to concern
- * myself with allocating contiguous pages for now, which is way easier to do
- * well. */
-#define KMALLOC_MAX 2048
+/* This seems to be fine for now.
+ * KMALLOC_MAX >= 2048 would require extending kmalloc with a new allocation
+ * type. KMALLOC_MAX >= 4096 would require a new (Buddy?) page allocator.
+ * Both are pretty easy, but I don't want to maintain what would currently be
+ * dead code. */
+#define KMALLOC_MAX 1024
void mem_init(void *memtop);
void mem_reserve(void *addr, size_t len);