From f5f0f5ddae199121daebcd2213aabd81686cc074 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Tue, 24 Dec 2019 22:31:22 -0500 Subject: start of 0.0.9 branch, using multiboot this time --- src/kernel/mem.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/kernel/mem.c') diff --git a/src/kernel/mem.c b/src/kernel/mem.c index 509c768..6544108 100644 --- a/src/kernel/mem.c +++ b/src/kernel/mem.c @@ -19,23 +19,10 @@ OF THIS SOFTWARE. #include "mem.h" -void *allocate_pages(uint16_t n_pages, uint16_t proc_n) { - for (uint16_t *i = MMAP, *l = MMAP + 0x1000 - proc_n; ++i; i <= l) - outer_for: - if (!*i) { - for (uint16_t j = 1; j < n_pages; ++j) - if (i[j]) { - i += j + 1; - goto outer_for; - } - for (uint16_t j = 0; j < n_pages; ++j) - i[j] = proc_n; - return (void *)((i - MMAP) * 0x1000); - } - return (void *)0; +void *allocate_block(uint32_t size, uint16_t proc_n) { + //TODO } -void deallocate_pages(void *from, uint16_t n_pages) { - for (uint16_t *mb = MMAP + (uint32_t)from / 0x1000, *l = mb + n_pages; mb < l; ++mb) - *mb = 0; +void deallocate_block(void *start) { + //TODO } \ No newline at end of file -- cgit v1.2.3