This commit is contained in:
Ilusha 2023-05-26 01:35:29 +03:00
commit d4c558a59a
34 changed files with 3850 additions and 0 deletions

26
public/Allocators.hpp Normal file
View file

@ -0,0 +1,26 @@
#pragma once
#include "HeapAllocator.hpp"
#include "ChunkAllocator.hpp"
#include "PoolAllocator.hpp"
namespace tp {
extern ModuleManifest gModuleAllocator;
};
inline void* operator new(size_t aSize, void* aWhere) noexcept { return aWhere; }
void* operator new(size_t aSize);
void* operator new[](size_t _Size);
void operator delete(void* aPtr);
void operator delete[](void* aPtr);
void* operator new(size_t aSize, tp::HeapAlloc& aAlloc);
void* operator new[](size_t _Size, tp::HeapAlloc& aAlloc);
void operator delete(void* aPtr, tp::HeapAlloc& aAlloc);
void operator delete[](void* aPtr, tp::HeapAlloc& aAlloc);
void* operator new(size_t aSize, tp::HeapAllocGlobal& aAlloc);
void* operator new[](size_t _Size, tp::HeapAllocGlobal& aAlloc);
void operator delete(void* aPtr, tp::HeapAllocGlobal& aAlloc);
void operator delete[](void* aPtr, tp::HeapAllocGlobal& aAlloc);