summaryrefslogtreecommitdiffhomepage
path: root/SDK/Libraries/CoreSystem/Headers/Heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'SDK/Libraries/CoreSystem/Headers/Heap.h')
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Heap.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/SDK/Libraries/CoreSystem/Headers/Heap.h b/SDK/Libraries/CoreSystem/Headers/Heap.h
new file mode 100644
index 00000000..b2ad6e74
--- /dev/null
+++ b/SDK/Libraries/CoreSystem/Headers/Heap.h
@@ -0,0 +1,39 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#pragma once
+
+#include <Headers/Defines.h>
+
+#define cAllocationKindCount (2U)
+
+enum CsAllocationKind
+{
+ kStandardAllocation = 0xC,
+ kArrayAllocation = 0xD,
+};
+
+/// @brief Allocates a new pointer from process pool.
+/// @param sz the size
+/// @param flags the allocation flags.
+/// @return
+CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz,
+ DWordType flags);
+
+/// @brief Check if the pointer exists.
+/// @param ptr the pointer to free.
+/// @return
+CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr);
+
+/// @brief Gets the size of the process' pointer.
+/// @param ptr the pointer to free.
+/// @return
+CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr);
+
+/// @brief Frees the process pointer.
+/// @param ptr the pointer to free.
+/// @return
+CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr);