diff options
author | Benji Dial <Benji3.141@gmail.com> | 2019-12-26 15:50:21 -0500 |
---|---|---|
committer | Benji Dial <Benji3.141@gmail.com> | 2019-12-26 15:50:21 -0500 |
commit | e0e08a12d4de86b558674fb9f90ad0b0204c26f0 (patch) | |
tree | 3e814fd4eb56e8fd73c3db06b3260ba09ce14746 /src/kernel/mem.h | |
parent | ef72082b2df5da98de13bbc8c35b66d891bd4b78 (diff) | |
download | portland-os-e0e08a12d4de86b558674fb9f90ad0b0204c26f0.tar.gz |
working memory manager
Diffstat (limited to 'src/kernel/mem.h')
-rw-r--r-- | src/kernel/mem.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/mem.h b/src/kernel/mem.h index 106db90..5c0d387 100644 --- a/src/kernel/mem.h +++ b/src/kernel/mem.h @@ -35,7 +35,11 @@ struct mmap_entry { struct mmap_entry *next; }; +#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); void *allocate_block(uint32_t size, uint16_t proc_n); void deallocate_block(void *start); |