diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-12-02 10:17:36 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-12-02 10:17:36 +0000 |
| commit | a5e5eabd32872f81a7190589aa648dc0e1963888 (patch) | |
| tree | 63d91dc24a3caacbcfd736ec190579e33823a89f /arch/x86_64/src/kernel | |
| parent | f880939eb5f1b5e70b15d6614cc440c09a0d9fd1 (diff) | |
| download | teachos-a5e5eabd32872f81a7190589aa648dc0e1963888.tar.xz teachos-a5e5eabd32872f81a7190589aa648dc0e1963888.zip | |
Fix algorithm issues with linked list allocator
Diffstat (limited to 'arch/x86_64/src/kernel')
| -rw-r--r-- | arch/x86_64/src/kernel/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index a4f138c..7992b34 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -41,6 +41,15 @@ namespace teachos::arch::kernel } heap_allocator.deallocate(test, 1024); + + heap_allocator.allocate(1024); // test 9 + auto test10 = heap_allocator.allocate(1024); + auto test11 = heap_allocator.allocate(1024); + auto test12 = heap_allocator.allocate(1024); + heap_allocator.allocate(1024); // test 13 + heap_allocator.deallocate(test11, 1024); + heap_allocator.deallocate(test10, 1024); + heap_allocator.deallocate(test12, 1024); } auto main() -> void @@ -52,6 +61,6 @@ namespace teachos::arch::kernel memory::initialize_memory_management(); // stack_overflow_test(0); - // heap_test(); + heap_test(); } } // namespace teachos::arch::kernel |
