diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-08 12:32:41 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-08 12:32:41 +0200 |
| commit | 09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch) | |
| tree | eda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /SDK/Developer/CoreCxxRuntime | |
| parent | ca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff) | |
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'SDK/Developer/CoreCxxRuntime')
| -rw-r--r-- | SDK/Developer/CoreCxxRuntime/.gitkeep | 0 | ||||
| -rw-r--r-- | SDK/Developer/CoreCxxRuntime/Sources/New+Delete.cxx | 33 |
2 files changed, 33 insertions, 0 deletions
diff --git a/SDK/Developer/CoreCxxRuntime/.gitkeep b/SDK/Developer/CoreCxxRuntime/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/SDK/Developer/CoreCxxRuntime/.gitkeep diff --git a/SDK/Developer/CoreCxxRuntime/Sources/New+Delete.cxx b/SDK/Developer/CoreCxxRuntime/Sources/New+Delete.cxx new file mode 100644 index 00000000..5ff3612f --- /dev/null +++ b/SDK/Developer/CoreCxxRuntime/Sources/New+Delete.cxx @@ -0,0 +1,33 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#include <Headers/Heap.h> + +typedef SizeType size_t; + +void* operator new[](size_t sz) +{ + if (sz == 0) + ++sz; + + return RtTlsAllocate(sz, kStandardAllocation); +} + +void* operator new(size_t sz) +{ + if (sz == 0) + ++sz; + + return RtTlsAllocate(sz, kArrayAllocation); +} + +void operator delete[](void* ptr) +{ + if (ptr == nullptr) + return; + + RtTlsFree(ptr); +}
\ No newline at end of file |
