diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2024-12-01 12:07:42 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2024-12-01 12:07:42 +0000 |
| commit | 2671b9522db44418536559524a22c95d3575569e (patch) | |
| tree | 18703f532dfcbef847c0c3af03a42d50c4f36e7c /arch/x86_64/src/kernel | |
| parent | b8fd52b6b3a7f002cff58ff8da0313a684cb3ab4 (diff) | |
| download | teachos-2671b9522db44418536559524a22c95d3575569e.tar.xz teachos-2671b9522db44418536559524a22c95d3575569e.zip | |
enable heap test
Diffstat (limited to 'arch/x86_64/src/kernel')
| -rw-r--r-- | arch/x86_64/src/kernel/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index 7463fc4..ea18232 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -2,6 +2,7 @@ #include "arch/memory/heap/bump_allocator.hpp" #include "arch/memory/heap/concept.hpp" +#include "arch/memory/heap/linked_list_allocator.hpp" #include "arch/memory/main.hpp" #include "arch/memory/multiboot/reader.hpp" #include "arch/video/vga/text.hpp" @@ -21,8 +22,8 @@ namespace teachos::arch::kernel auto heap_test() -> void { - memory::heap::bump_allocator heap_allocator{memory::heap::HEAP_START, - memory::heap::HEAP_START + memory::heap::HEAP_SIZE}; + memory::heap::linked_list_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{}; test = static_cast<void *>(static_cast<memory::multiboot::memory_information *>(test) + 1); @@ -49,6 +50,6 @@ namespace teachos::arch::kernel memory::initialize_memory_management(); // stack_overflow_test(0); - // heap_test(); + heap_test(); } } // namespace teachos::arch::kernel |
