diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2024-12-01 13:34:46 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2024-12-01 13:34:46 +0000 |
| commit | 9072c2a277c0da298b977cf4fb3dbebb5481abd0 (patch) | |
| tree | e3c4fdf75e3cb73a0cc2d966c7179b371612d77f /arch/x86_64/src/kernel/main.cpp | |
| parent | 0cf972394e99dfa69fbaf2ec9f4c718fd36bbc3e (diff) | |
| download | teachos-9072c2a277c0da298b977cf4fb3dbebb5481abd0.tar.xz teachos-9072c2a277c0da298b977cf4fb3dbebb5481abd0.zip | |
implement clear_memory_block_header
Diffstat (limited to 'arch/x86_64/src/kernel/main.cpp')
| -rw-r--r-- | arch/x86_64/src/kernel/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index ea18232..a4f138c 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -26,8 +26,8 @@ namespace teachos::arch::kernel memory::heap::HEAP_START + memory::heap::HEAP_SIZE}; auto test = heap_allocator.allocate(1024); auto test2 = new (test) memory::multiboot::memory_information{}; - test = static_cast<void *>(static_cast<memory::multiboot::memory_information *>(test) + 1); - auto test3 = new (test) memory::multiboot::memory_information{}; + auto test3 = new (static_cast<void *>(static_cast<memory::multiboot::memory_information *>(test) + 1)) + memory::multiboot::memory_information{}; auto test4 = *test2; auto test5 = *test3; test4.kernel_end = 5000; @@ -39,6 +39,8 @@ namespace teachos::arch::kernel { video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); } + + heap_allocator.deallocate(test, 1024); } auto main() -> void @@ -50,6 +52,6 @@ namespace teachos::arch::kernel memory::initialize_memory_management(); // stack_overflow_test(0); - heap_test(); + // heap_test(); } } // namespace teachos::arch::kernel |
