From 58b5c8ba417fe99c01d9a48731b887ce434e797e Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Fri, 27 Dec 2019 17:19:51 -0500 Subject: lots of new stuff. new memory manager, some stuff on file plumbing --- src/kernel/mem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/kernel/mem.h') diff --git a/src/kernel/mem.h b/src/kernel/mem.h index 5c0d387..4a35978 100644 --- a/src/kernel/mem.h +++ b/src/kernel/mem.h @@ -32,14 +32,15 @@ struct mmap_entry { uint32_t base; uint32_t length; uint16_t whose; - struct mmap_entry *next; + struct mmap_entry *after; + struct mmap_entry *before; }; #define MMAP_SIZE 65536 struct mmap_entry *mmap_start; struct mmap_entry mmap_bss[MMAP_SIZE]; uint32_t mmap_bitmap[MMAP_SIZE / 32]; -#define unmark_entry(entry) mmap_bitmap[((entry) - mmap_bss) >> 5] ^= 1 << (((entry) - mmap_bss) & 0x0000001f); +#define unmark_entry(entry) (mmap_bitmap[((entry) - mmap_bss) >> 5] ^= 1 << (((entry) - mmap_bss) & 0x0000001f)) void *allocate_block(uint32_t size, uint16_t proc_n); void deallocate_block(void *start); -- cgit v1.2.3