summaryrefslogtreecommitdiffstats
path: root/src/leeds/base/memoryManager.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/leeds/base/memoryManager.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/leeds/base/memoryManager.h b/src/leeds/base/memoryManager.h
new file mode 100644
index 00000000..91124cd1
--- /dev/null
+++ b/src/leeds/base/memoryManager.h
@@ -0,0 +1,39 @@
+#pragma once
+
+namespace base
+{
+ class cMemoryManager
+ {
+ public:
+ cMemoryManager();
+ void* Allocate(uint32 size);
+ void* AllocateAligned(uint32 size);
+ void* Realloc(void* buf, uint32 newSize, bool unk);
+ void Free(void* buf);
+ bool IsFree(void* buf);
+ };
+
+ class cMainMemoryManager : public cMemoryManager
+ {
+ static cMainMemoryManager* m_pInstance;
+ static void Init(void*, uint32);
+
+ public:
+ cMainMemoryManager();
+ static cMainMemoryManager *Instance()
+ {
+ static cMainMemoryManager instance;
+ return &instance;
+ }
+ };
+
+ class cMemoryBlock
+ {
+ // TODO
+ };
+}
+
+void* operator new(size_t size);
+void* operator new[](size_t size);
+void operator delete(void* buf) noexcept;
+void operator delete[](void* buf) noexcept; \ No newline at end of file