diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-19 10:05:31 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-19 10:05:31 +0100 |
| commit | baf2afd8cd672dcb9c13d956dfdd73b61dfee558 (patch) | |
| tree | 0734d2fe6d480e9805121e1c7d5e42f20bf4e8f4 /Public/Kits/System.Core/Heap.cxx | |
| parent | 98347089c7e4e2b306d25a0db77e00aa2ea50882 (diff) | |
unstable, secret: See below.
System.Core:
- Add RunTime init function.
- Add ReadMe.md
Kernel:
- Improve TLS code, use Encoder class instead of casting directly.
- Refactor process team to include processscheduler.hpp instead.
ObjectKit:
- Rename Object.hxx to ObjectKit.hxx
Builtins/AHCI:
- Rename API.hxx to Interface.hxx
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Kits/System.Core/Heap.cxx')
| -rw-r--r-- | Public/Kits/System.Core/Heap.cxx | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/Public/Kits/System.Core/Heap.cxx b/Public/Kits/System.Core/Heap.cxx deleted file mode 100644 index aaac37a8..00000000 --- a/Public/Kits/System.Core/Heap.cxx +++ /dev/null @@ -1,38 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - -------------------------------------------- */ - -#include <System.Core/Heap.hxx> -#include <System.Core/System.Core.hxx> - -using namespace System; - -Heap* Heap::Shared() noexcept { - static Heap* heap = nullptr; - - if (!heap) { - heap = new Heap(); - kInstanceObject = HcGetProcessObject(); - } - - return heap; -} - -void Heap::Delete(HeapPtr me) noexcept { - CA_MUST_PASS(me); - HcFreeProcessHeap(kInstanceObject, me); -} - -SizeT Heap::Size(HeapPtr me) noexcept { - CA_MUST_PASS(me); - return HcProcessHeapSize(kInstanceObject, me); -} - -HeapPtr Heap::New(const SizeT &sz, const Int32 flags) { - SizeT _sz = sz; - if (!_sz) ++_sz; - - return HcAllocateProcessHeap(kInstanceObject, _sz, flags); -}
\ No newline at end of file |
