diff options
author | Benji Dial <Benji3.141@gmail.com> | 2019-12-27 17:19:51 -0500 |
---|---|---|
committer | Benji Dial <Benji3.141@gmail.com> | 2019-12-27 17:19:51 -0500 |
commit | 58b5c8ba417fe99c01d9a48731b887ce434e797e (patch) | |
tree | a09f7d0a6543328d70f8c02be8a37c320be5ef71 /src/kernel/mem.h | |
parent | 3f3f9a806dc63ad827fe28724dabe694f6e67f1e (diff) | |
download | portland-os-58b5c8ba417fe99c01d9a48731b887ce434e797e.tar.gz |
lots of new stuff. new memory manager, some stuff on file plumbing
Diffstat (limited to 'src/kernel/mem.h')
-rw-r--r-- | src/kernel/mem.h | 5 |
1 files changed, 3 insertions, 2 deletions
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); |