diff options
author | dzwdz | 2023-01-25 22:05:35 +0100 |
---|---|---|
committer | dzwdz | 2023-01-25 22:05:35 +0100 |
commit | 353647418912b5b6b94473b15bee312ddc4d64a9 (patch) | |
tree | 495eae13e6287fdb964628bf3602fcfdd937f36d /src/kernel/mem/alloc.h | |
parent | e06cf9993b5a40abcf6c1d6c77b497ff69a9fd44 (diff) |
kernel: move /mem/alloc to /malloc and linker.ld to arch/amd64/
Diffstat (limited to 'src/kernel/mem/alloc.h')
-rw-r--r-- | src/kernel/mem/alloc.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/kernel/mem/alloc.h b/src/kernel/mem/alloc.h deleted file mode 100644 index 671a468..0000000 --- a/src/kernel/mem/alloc.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#include <kernel/arch/generic.h> -#include <shared/mem.h> -#include <stddef.h> - -extern struct malloc_hdr *malloc_last; - -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); - -// frees `pages` consecutive pages starting from *first -void page_free(void *first, size_t pages); - -void kmalloc_sanity(const void *addr); -void *kmalloc(size_t len); -void kfree(void *ptr); - -static inline void *kzalloc(size_t len) { - void *b = kmalloc(len); - memset(b, 0, len); - return b; -} |