From 82cfe7fe12626a3bdf1bdf9efcbc7911051ebddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 24 Nov 2024 13:55:00 +0000 Subject: Read and write in allocated memory area --- arch/x86_64/src/kernel/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/x86_64/src/kernel') diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index ce13723..f4eb033 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -19,10 +19,10 @@ namespace teachos::arch::kernel memory::heap::bump_allocator heap_allocator{memory::heap::HEAP_START, memory::heap::HEAP_START + memory::heap::HEAP_SIZE}; auto test = heap_allocator.allocate(1024); - auto test2 = new (test) memory::multiboot::memory_information{}; - - if (test || test2) + test2->kernel_end = 5000; + auto test3 = test2->kernel_end; + if (test || test2 || test3) { video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); } -- cgit v1.2.3