diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-28 20:54:33 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-28 20:54:33 +0100 |
| commit | b2c7b8604ed3a4c209a15a9ffd718a43163dd9b4 (patch) | |
| tree | 851d79e3a9b1c676b48ec8dfcd2b989f4da45c9b /Public/Developer/System.Core/Sources/Heap.c | |
| parent | 215518ae55a54973a1ae18f572ca5bf0ac2a499e (diff) | |
NewKernel: Add PowerPC partition type inside EPM, add Leak() FileStream method. and documentation.
SystemLib: Start implementing the API.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer/System.Core/Sources/Heap.c')
| -rw-r--r-- | Public/Developer/System.Core/Sources/Heap.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Public/Developer/System.Core/Sources/Heap.c b/Public/Developer/System.Core/Sources/Heap.c index 390ae072..db4a16bf 100644 --- a/Public/Developer/System.Core/Sources/Heap.c +++ b/Public/Developer/System.Core/Sources/Heap.c @@ -7,40 +7,36 @@ #include <System.Core/Headers/Heap.h> /// @brief Allocate from the user's heap. -/// @param refObj Process object. /// @param sz size of object. /// @param flags flags. /// @return -CA_EXTERN_C PtrVoidType RtAllocateProcessHeap(ObjectRef refObj, QWordType sz, - DWordType flags) { +CA_EXTERN_C PtrVoidType RtAllocateProcessPtr(QWordType sz, + DWordType flags) { CA_MUST_PASS(sz); CA_MUST_PASS(flags); - return (PtrVoidType)refObj->Invoke(refObj, kProcessCallAllocPtr, sz, flags); + return (PtrVoidType)kApplicationObject->Invoke(kApplicationObject, kCallAllocPtr, sz, flags); } /// @brief Free pointer from the user's heap. -/// @param refObj Process object. /// @param ptr the pointer to free. -CA_EXTERN_C VoidType RtFreeProcessHeap(ObjectRef refObj, PtrVoidType ptr) { +CA_EXTERN_C VoidType RtFreeProcessPtr(PtrVoidType ptr) { CA_MUST_PASS(ptr); - CA_UNREFERENCED_PARAMETER(refObj->Invoke(refObj, kProcessCallFreePtr, ptr)); + CA_UNREFERENCED_PARAMETER(kApplicationObject->Invoke(kApplicationObject, kCallFreePtr, ptr)); } /// @brief Get pointer size. -/// @param refObj Process object. /// @param ptr the pointer to find. /// @return the size. -CA_EXTERN_C QWordType RtProcessHeapSize(ObjectRef refObj, PtrVoidType ptr) { +CA_EXTERN_C QWordType RtProcessPtrSize(PtrVoidType ptr) { CA_MUST_PASS(ptr); - return refObj->Invoke(refObj, kProcessCallSizePtr, ptr); + return kApplicationObject->Invoke(kApplicationObject, kCallSizePtr, ptr); } /// @brief Check if the pointer exists. -/// @param refObj Process object. /// @param ptr the pointer to check. /// @return if it exists -CA_EXTERN_C BooleanType RtProcessHeapExists(ObjectRef refObj, PtrVoidType ptr) { +CA_EXTERN_C BooleanType RtProcessPtrExists(PtrVoidType ptr) { CA_MUST_PASS(ptr); - return refObj->Invoke(refObj, kProcessCallCheckPtr, ptr); + return kApplicationObject->Invoke(kApplicationObject, kCallCheckPtr, ptr); } |
