From 95e33f7f9362aadd9c6169b41437ca478aa3be14 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 31 Jul 2021 14:36:56 +0200 Subject: kmalloc() and kfree() stubs --- src/kernel/mem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/kernel/mem.c') diff --git a/src/kernel/mem.c b/src/kernel/mem.c index 5684bb7..19a10a9 100644 --- a/src/kernel/mem.c +++ b/src/kernel/mem.c @@ -25,3 +25,13 @@ void *page_alloc(size_t pages) { void page_free(void *first, size_t pages) { // not implemented } + + +void *kmalloc(size_t len) { + // extremely inefficient, but this is only temporary anyways + return page_alloc(len / PAGE_SIZE + 1); +} + +void kfree(void *ptr) { + // unimplemented +} -- cgit v1.2.3