diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-15 20:51:05 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-15 20:51:05 +0200 |
commit | d415aca695956c79110c88fa58c12bf55c0e2163 (patch) | |
tree | 61c9589fe1cf1a78f7f582eff410e047eada604e /src/kernel/core/frame.c | |
parent | 327d62f7d56f79999cac6407bdfdcc0b90510aef (diff) | |
download | kogata-d415aca695956c79110c88fa58c12bf55c0e2163.tar.gz kogata-d415aca695956c79110c88fa58c12bf55c0e2163.zip |
Fix nasty task switching bu
Diffstat (limited to 'src/kernel/core/frame.c')
-rw-r--r-- | src/kernel/core/frame.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/core/frame.c b/src/kernel/core/frame.c index e74f9ad..7cc9bca 100644 --- a/src/kernel/core/frame.c +++ b/src/kernel/core/frame.c @@ -16,8 +16,9 @@ static uint32_t begin_search_at; void frame_init_allocator(size_t total_ram, void** kernel_data_end) { nframes = PAGE_ID(total_ram); + // Statically allocate space after kernel data end frame_bitset = (uint32_t*)ALIGN4_UP((size_t)*kernel_data_end); - *kernel_data_end = (void*)frame_bitset + ALIGN4_UP(nframes / 8); + *kernel_data_end = (void*)((size_t)frame_bitset + ALIGN4_UP(nframes / 8)); for (size_t i = 0; i < ALIGN4_UP(nframes / 8)/4; i++) frame_bitset[i] = 0; |