From fbfc078e9f44c1c1e95c9c484f1d5650bcf631b7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 27 Jul 2024 16:57:39 -0400 Subject: lots and lots of userspace stuff --- euler/source/memory/delete.cpp | 17 ----------------- euler/source/memory/new.cpp | 13 ------------- 2 files changed, 30 deletions(-) delete mode 100644 euler/source/memory/delete.cpp delete mode 100644 euler/source/memory/new.cpp (limited to 'euler/source/memory') diff --git a/euler/source/memory/delete.cpp b/euler/source/memory/delete.cpp deleted file mode 100644 index e4cc288..0000000 --- a/euler/source/memory/delete.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include - -void operator delete(void *ptr) { - euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8)); -} - -void operator delete(void *ptr, uint64_t) { - euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8)); -} - -void operator delete[](void *ptr) { - euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8)); -} - -void operator delete[](void *ptr, uint64_t) { - euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8)); -} diff --git a/euler/source/memory/new.cpp b/euler/source/memory/new.cpp deleted file mode 100644 index 931328f..0000000 --- a/euler/source/memory/new.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include - -void *operator new(uint64_t size) { - void *ptr = euler::alloc(size + 8); - *(uint64_t *)ptr = size + 8; - return (uint8_t *)ptr + 8; -} - -void *operator new[](uint64_t size) { - void *ptr = euler::alloc(size + 8); - *(uint64_t *)ptr = size + 8; - return (uint8_t *)ptr + 8; -} -- cgit v1.2.3