diff options
Diffstat (limited to 'src/kernel/mem.c')
-rw-r--r-- | src/kernel/mem.c | 21 |
1 files changed, 4 insertions, 17 deletions
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 |