summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-09-15 09:17:33 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-09-15 09:17:47 +0200
commit8717ea629c06efe785e86f639727c522980f215a (patch)
tree675c9eb10dc38e55ebc9021877cd6ae5a5426b36 /dev
parent9e9a2d945a4ab1acb2034344267bff59ba76f0d4 (diff)
FIX: Zero memory the HIB's padding zone. (Heap.cxx)
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev')
-rw-r--r--dev/ZKA/Sources/Heap.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/dev/ZKA/Sources/Heap.cxx b/dev/ZKA/Sources/Heap.cxx
index 1616912e..21ee6d67 100644
--- a/dev/ZKA/Sources/Heap.cxx
+++ b/dev/ZKA/Sources/Heap.cxx
@@ -9,6 +9,7 @@
#include <KernelKit/Heap.hxx>
#include <NewKit/Crc32.hxx>
#include <NewKit/PageMgr.hxx>
+#include <NewKit/Utils.hxx>
//! @file KernelHeap.cxx
//! @brief Kernel heap allocator.
@@ -113,6 +114,8 @@ namespace Kernel
heap_info_ptr->fUser = user;
heap_info_ptr->fPresent = Yes;
+ rt_set_memory(heap_info_ptr->fPadding, 0, kKernelHeapHeaderPaddingSz);
+
auto result = reinterpret_cast<VoidPtr>(heap_info_ptr->fHeapPtr);
kLatestAllocation = heap_info_ptr;