summaryrefslogtreecommitdiff
path: root/src/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r--src/kernel/kernel.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index f2210d6..c0bc285 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -91,13 +91,14 @@ void kernel_main( void )
// TODO: get memupper from multiboot header (but this needs
// a multiboot compliant entry function first) or use BIOS
// functions to determine size of memory, for now assume we
- // have at least, for now use the memory above 1 MB, 64 MB
- // heap is enough for what we are doing in the kernel
- memory_manager_init( &global_context.memory_manager, 0x100000, 0xFFFF );
+ // have at least, for now use the memory above 1 MB, 128 KB
+ // heap is enough for what we are doing in the kernel plus
+ // eventual z buffering the VGA graphic mode
+ uint32_t heap_offset = 0x01000000;
+ size_t heap_size = 128 * 1024;
+ memory_manager_init( &global_context.memory_manager, heap_offset, heap_size );
__stdlib_set_memory_manager( &global_context.memory_manager );
- printf( "Kernel heap at 0x%X, size 0x%X\n", 0x100000, 0xFFFF );
- void *test = malloc( 2048 );
- free( test );
+ printf( "Kernel heap at 0x%X, size 0x%X\n", heap_offset, heap_size );
// exit point in case of kernel panic, do this as soon as
// possible, as soon we have an early console we can croak on