From d415aca695956c79110c88fa58c12bf55c0e2163 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 15 Jul 2016 20:51:05 +0200 Subject: Fix nasty task switching bu --- src/kernel/core/frame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/core/frame.c') 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; -- cgit v1.2.3