summaryrefslogtreecommitdiffhomepage
path: root/dev/zka/src
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-10-08 19:17:37 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-10-08 19:21:53 +0200
commit2a51866f3f39d4ebf0fd2d132cfad1e2962d1236 (patch)
treea325b523090f1bbc027114314ec946cd2226923a /dev/zka/src
parentc43a509be4e1098ad73d0449e512d118add7f151 (diff)
IMP: A New set of features and APIs in zka-sci-cxx.dll
- IStr object for a class like string object. - New SCI APIs, Disk management. Loader, I/O and new Mm functions. - Fixed and improved XPCOMReleaseClass. - Using IStr when dealing with XPCOM events. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/zka/src')
-rw-r--r--dev/zka/src/Heap.cxx12
-rw-r--r--dev/zka/src/Network/IPC.cxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/dev/zka/src/Heap.cxx b/dev/zka/src/Heap.cxx
index edab14a2..ddf20b9c 100644
--- a/dev/zka/src/Heap.cxx
+++ b/dev/zka/src/Heap.cxx
@@ -19,7 +19,7 @@
------------------------------------------- */
//! @file Heap.cxx
-//! @brief Kernel's heap allocator.
+//! @brief Kernel's heap manager, serves as the main memory manager.
#define kKernelHeapMagic (0xD4D7D5)
#define kKernelAlignSz (__BIGGEST_ALIGNMENT__)
@@ -33,7 +33,7 @@ namespace Kernel
/// @brief Kernel heap information block.
/// Located before the address bytes.
- /// | HIB | ADDRESS |
+ /// | HIB | CLASS/STRUCT/DATA TYPES... |
struct PACKED HEAP_INFORMATION_BLOCK final
{
///! @brief 32-bit value which contains the magic number of the heap.
@@ -65,7 +65,7 @@ namespace Kernel
};
/// @brief Check for heap address validity.
- /// @param heap_ptr The address_ptr
+ /// @param heap_ptr The address_ptr to check.
/// @return Bool if the pointer is valid or not.
auto mm_check_heap_address(VoidPtr heap_ptr) -> Bool
{
@@ -160,8 +160,8 @@ namespace Kernel
}
/// @brief Makes a page heap.
- /// @param heap_ptr
- /// @return
+ /// @param heap_ptr the pointer to make a page heap.
+ /// @return kErrorSuccess if successful, otherwise an error code.
Int32 mm_make_ke_page(VoidPtr heap_ptr)
{
if (Detail::mm_check_heap_address(heap_ptr) == No)
@@ -271,7 +271,7 @@ namespace Kernel
{
Detail::HEAP_INFORMATION_BLOCK_PTR heap_blk =
reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
- (UIntPtr)(heap_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK));
+ (UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
if (heap_ptr && heap_blk->fPresent && kKernelHeapMagic == heap_blk->fMagic)
{
diff --git a/dev/zka/src/Network/IPC.cxx b/dev/zka/src/Network/IPC.cxx
index 42b0fcb9..f533b58e 100644
--- a/dev/zka/src/Network/IPC.cxx
+++ b/dev/zka/src/Network/IPC.cxx
@@ -14,7 +14,7 @@ using namespace Kernel;
/// @brief The internal sanitize function.
Bool ipc_int_sanitize_packet(IPC_MESSAGE_STRUCT* pckt)
{
- auto endian = DEDUCE_ENDIAN(pckt, ((Char*)pckt)[0]);
+ auto endian = cDeduceEndian(pckt, ((Char*)pckt)[0]);
switch (endian)
{
@@ -92,7 +92,7 @@ namespace Kernel
if (*pckt_in)
{
- auto endian = DEDUCE_ENDIAN((*pckt_in), ((Char*)(*pckt_in))[0]);
+ auto endian = cDeduceEndian((*pckt_in), ((Char*)(*pckt_in))[0]);
(*pckt_in)->IpcHeaderMagic = cXPCOMHeaderMagic;