From 3e2a3170501fb02b5b46a342c47d2ba8b1a6e244 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 14 Mar 2015 16:36:31 +0100 Subject: Factorize region allocator between kernel and user processes (same code was there twice) --- src/kernel/core/kmain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/core/kmain.c') diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c index 3ee2238..2774e11 100644 --- a/src/kernel/core/kmain.c +++ b/src/kernel/core/kmain.c @@ -113,7 +113,8 @@ void kmain(multiboot_info_t *mbd, int32_t mb_magic) { paging_setup(kernel_data_end); dbg_printf("Paging seems to be working!\n"); - region_allocator_init(kernel_data_end); + region_allocator_init((void*)K_HIGHHALF_ADDR, (void*)PAGE_ALIGN_UP(kernel_data_end), + (void*)LAST_KERNEL_ADDR, alloc_map_single_frame); dbg_printf("Region allocator initialized.\n"); TEST_PLACEHOLDER_AFTER_REGION; -- cgit v1.2.3