Revert "Isolate JKRHeap operator overloads" (#39)

This commit is contained in:
TakaRikka
2026-03-06 19:49:35 -08:00
committed by GitHub
parent fa47658844
commit 3623b27f37
630 changed files with 3349 additions and 3452 deletions
+1 -3
View File
@@ -16,8 +16,6 @@
#include <cstdlib>
#include <memory>
#include "JSystem/JKernel/JKRHeap.h"
// ============================================================================
// Malloc-based allocator to bypass JKRHeap operator new/delete
// ============================================================================
@@ -49,7 +47,7 @@ template<typename T, typename... Args>
std::unique_ptr<T, MallocDeleter<T>> make_malloc_unique(Args&&... args) {
void* mem = std::malloc(sizeof(T));
if (!mem) throw std::bad_alloc();
T* obj = JKR_NEW_ARGS (mem) T(std::forward<Args>(args)...);
T* obj = new (mem) T(std::forward<Args>(args)...);
return std::unique_ptr<T, MallocDeleter<T>>(obj);
}