From de413aa50bac1342e4ac8c7a66697ea3b551c2e4 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 19 Mar 2024 21:01:12 +0100 Subject: Kernel(Secret): Major commit. - Extensive cleanup of the code, and kernel improvements. - The System API has been reworked to be better designed. What is needed now: - AHCI disk driver. - HCFS/NewFS driver. - EPM layout implementation. - Separate bootloader and kernel. --- Public/Kits/System.Core/Heap.hxx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'Public/Kits/System.Core/Heap.hxx') diff --git a/Public/Kits/System.Core/Heap.hxx b/Public/Kits/System.Core/Heap.hxx index dfcb4587..31e44c7e 100644 --- a/Public/Kits/System.Core/Heap.hxx +++ b/Public/Kits/System.Core/Heap.hxx @@ -6,8 +6,22 @@ #pragma once -#include #include +#include + +#define kAllocationTypes 2 + +CA_EXTERN_C PVOID HcAllocateProcessHeap(ObjectPtr refObj, QWORD sz, + DWORD flags); +CA_EXTERN_C BOOL HcProcessHeapExists(ObjectPtr refObj, PVOID ptr); +CA_EXTERN_C QWORD HcProcessHeapSize(ObjectPtr refObj, PVOID ptr); +CA_EXTERN_C VOID HcFreeProcessHeap(ObjectPtr refObj, PVOID ptr); +CA_EXTERN_C ObjectPtr HcGetProcessObject(void); + +enum HcAllocationKind { + kStandardAllocation = 0xC, + kArrayAllocation = 0xD, +}; namespace System { using namespace HCore; @@ -29,7 +43,7 @@ class Heap final { explicit Heap() = default; public: - ~Heap() = default; + ~Heap(); public: HCORE_COPY_DEFAULT(Heap); @@ -56,9 +70,10 @@ class MemoryException final { const char *Reason(); private: - const char *mReason{"System.Core: Process Heap Exception: Catastrophic failure!"}; + const char *mReason{ + "System.Core: Process Heap Exception: Catastrophic failure!"}; private: friend Heap; }; -} // namespace System \ No newline at end of file +} // namespace System \ No newline at end of file -- cgit v1.2.3