diff options
author | dzwdz | 2024-07-13 23:37:37 +0200 |
---|---|---|
committer | dzwdz | 2024-07-13 23:37:37 +0200 |
commit | c1d3ac750b8483c9a942d2fb5d5b7245d014e905 (patch) | |
tree | 630fb27832e15f3dfde0b0723c5e08a4421e8d22 /src/kernel/malloc.h | |
parent | ded843efbdad1ed048fe42c50c8fb68d50bafa51 (diff) |
kernel/malloc: limit the maximum allocation size to under a page
This will likely be changed back, but for the time being it will let me
implement a better allocator without too much effort.
Diffstat (limited to 'src/kernel/malloc.h')
-rw-r--r-- | src/kernel/malloc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/malloc.h b/src/kernel/malloc.h index 03934de..3469f5f 100644 --- a/src/kernel/malloc.h +++ b/src/kernel/malloc.h @@ -3,12 +3,16 @@ #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 + void mem_init(void *memtop); void mem_reserve(void *addr, size_t len); void mem_debugprint(void); // allocates `pages` consecutive pages -// TODO deprecate void *page_alloc(size_t pages); // zeroes the allocated pages void *page_zalloc(size_t pages); |