summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/System.Core/Heap.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-19 21:01:12 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-19 21:01:12 +0100
commitde413aa50bac1342e4ac8c7a66697ea3b551c2e4 (patch)
treeeef86262346e556f276727da3d8175ead9c6ff1d /Public/Kits/System.Core/Heap.hxx
parentaf7bb25934e8f6781cb7b34ef345ef9af723a2ff (diff)
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.
Diffstat (limited to 'Public/Kits/System.Core/Heap.hxx')
-rw-r--r--Public/Kits/System.Core/Heap.hxx23
1 files changed, 19 insertions, 4 deletions
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 <System.Core/Defs.hxx>
#include <CompilerKit/CompilerKit.hxx>
+#include <System.Core/Defs.hxx>
+
+#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