From 8d39f3f67734bf39cada370c39243e6ef33bf4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 18 May 2025 14:45:05 +0000 Subject: Make new usable for both kernel and user calls --- arch/x86_64/src/user/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/x86_64/src/user') diff --git a/arch/x86_64/src/user/main.cpp b/arch/x86_64/src/user/main.cpp index e621327..8b07e4a 100644 --- a/arch/x86_64/src/user/main.cpp +++ b/arch/x86_64/src/user/main.cpp @@ -12,8 +12,7 @@ namespace teachos::arch::user { auto main() -> void { - // Test writing to VGA Buffer - char constexpr syscall_message[] = "Successfully entered user mode and wrote to VGA buffer via syscall!"; + constexpr char syscall_message[] = "Successfully entered user mode and wrote to VGA buffer via syscall!"; context_switching::syscall::syscall(context_switching::syscall::type::WRITE, {reinterpret_cast(&syscall_message)}); @@ -26,8 +25,7 @@ namespace teachos::arch::user item.exchange(max_value + 2); }); - // Test user heap - auto address = memory::heap::global_heap_allocator::malloc(8U); + auto address = new uint64_t{10U}; (void)address; for (;;) -- cgit v1.2.3