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