diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-28 22:49:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-28 22:53:45 +0100 |
| commit | d562c97291a69d1ce73e89ba300209a49d419173 (patch) | |
| tree | 7ee625bb1ef115f3fae9cf60e0586880dc8ba3c7 /Public/Developer/System.Cxx | |
| parent | b2c7b8604ed3a4c209a15a9ffd718a43163dd9b4 (diff) | |
Extend Swap HD from 4MIB to 16MIB, Made SystemLib purely C, added SystemCxxLib for that occasion.
Update Framebuffer include to define the color utils inside the C++
source file.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer/System.Cxx')
| -rw-r--r-- | Public/Developer/System.Cxx/.gitkeep | 0 | ||||
| -rw-r--r-- | Public/Developer/System.Cxx/Sources/New+Delete.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Public/Developer/System.Cxx/.gitkeep b/Public/Developer/System.Cxx/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Public/Developer/System.Cxx/.gitkeep diff --git a/Public/Developer/System.Cxx/Sources/New+Delete.cxx b/Public/Developer/System.Cxx/Sources/New+Delete.cxx new file mode 100644 index 00000000..b54b5ea8 --- /dev/null +++ b/Public/Developer/System.Cxx/Sources/New+Delete.cxx @@ -0,0 +1,27 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#include <System.Core/Headers/Heap.h> + +typedef SizeType size_t; + +void* operator new[](size_t sz) { + if (sz == 0) ++sz; + + return RtAllocateProcessPtr(sz, kStandardAllocation); +} + +void* operator new(size_t sz) { + if (sz == 0) ++sz; + + return RtAllocateProcessPtr(sz, kArrayAllocation); +} + +void operator delete[](void* ptr) { + if (ptr == nullptr) return; + + RtFreeProcessPtr(ptr); +}
\ No newline at end of file |
