From 4eb396a6c718c68ba1756fcbb6490fd08d903ff2 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 20 Dec 2021 10:01:01 +0100 Subject: [PATCH] More bugs --- kernel/memory.c | 6 ++++-- kernel/memory.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/memory.c b/kernel/memory.c index 51f193b..7fd295a 100644 --- a/kernel/memory.c +++ b/kernel/memory.c @@ -55,6 +55,10 @@ void block_free(uint blockidx) { last_block = blockidx; } +uint find_free(uint block_count) { + // TODO: find a free start block to allocate +} + bool check_block_range(uint start, uint end) { bool allowed = true; @@ -91,8 +95,6 @@ void pm_alloc_range(ulong start, ulong end, bool force) { } } -/* pointer pm_malloc(uint block_count) { } -*/ diff --git a/kernel/memory.h b/kernel/memory.h index 770e503..f6fce88 100644 --- a/kernel/memory.h +++ b/kernel/memory.h @@ -16,6 +16,8 @@ void mod_bitmap(uint bit, uint flag); pointer block_alloc(uint blockidx); // allocate a block void block_free(uint blockidx); // free a block +uint find_free(uint block_count); + bool check_block_range(uint start, uint end); void pm_alloc_range(ulong start, ulong end, bool force); // allocate a range of memory