diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-29 17:01:55 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-29 17:06:28 +0100 |
| commit | 7e5be1572c043484293ee0cdd840dd41f54e87ee (patch) | |
| tree | 171427b27eb240d4006fda89e485ce6da28fd749 /Public/Developer/CxxLib | |
| parent | d7eb7affee3733dfeee6864045da4c2f5df2e919 (diff) | |
Kernel and SystemLib: See below.
What has been done:
- Rename most System.Core to SystemLib.
- Reworked it's API and the concept of ObjectRef to become the
ApplicationRef object.
- Remove unused ODF and XIFF file format from tree, ODF will be part of
the text editing program.
- Update Readme for SystemLib.
- Add Support folder on NewFS partitions.
What is next:
- NewFS filesystem support.
- Program loading.
- Preemptive scheduler on non-SMP systems using timers.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer/CxxLib')
| -rw-r--r-- | Public/Developer/CxxLib/.gitkeep | 0 | ||||
| -rw-r--r-- | Public/Developer/CxxLib/Sources/New+Delete.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Public/Developer/CxxLib/.gitkeep b/Public/Developer/CxxLib/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Public/Developer/CxxLib/.gitkeep diff --git a/Public/Developer/CxxLib/Sources/New+Delete.cxx b/Public/Developer/CxxLib/Sources/New+Delete.cxx new file mode 100644 index 00000000..c95da3e1 --- /dev/null +++ b/Public/Developer/CxxLib/Sources/New+Delete.cxx @@ -0,0 +1,27 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#include <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 |
