summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-10-13 12:47:53 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-10-13 12:47:53 +0200
commit182f2baa4d38a286d3453cc0da90ebec5fb25266 (patch)
tree170f7d9163195a6557220f46fa0cc3d153af80a0
parent7bd97fee4c9d470aeaa1a83fea23fff8b6952130 (diff)
IMP: Remove timeouts function inside Heap, they were a bad idea and
didn't work anyways. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
-rw-r--r--dev/zka/src/DriveMgr.cxx2
-rw-r--r--dev/zka/src/Heap.cxx25
2 files changed, 2 insertions, 25 deletions
diff --git a/dev/zka/src/DriveMgr.cxx b/dev/zka/src/DriveMgr.cxx
index 6e231772..adb21693 100644
--- a/dev/zka/src/DriveMgr.cxx
+++ b/dev/zka/src/DriveMgr.cxx
@@ -13,7 +13,7 @@
#include <modules/NVME/NVME.hxx>
/// @file DriveMgr.cxx
-/// @brief Kernel drive manager.
+/// @brief Drive manager.
namespace Kernel
{
diff --git a/dev/zka/src/Heap.cxx b/dev/zka/src/Heap.cxx
index ddf20b9c..9840f0e3 100644
--- a/dev/zka/src/Heap.cxx
+++ b/dev/zka/src/Heap.cxx
@@ -85,16 +85,6 @@ namespace Kernel
}
typedef HEAP_INFORMATION_BLOCK* HEAP_INFORMATION_BLOCK_PTR;
-
- Void mm_alloc_init_timeout(Void) noexcept
- {
- ZKA_UNUSED(0);
- }
-
- Void mm_alloc_fini_timeout(Void) noexcept
- {
- ZKA_UNUSED(0);
- }
} // namespace Detail
Detail::HEAP_INFORMATION_BLOCK_PTR kLatestAllocation = nullptr;
@@ -102,7 +92,7 @@ namespace Kernel
/// @brief Declare a new size for ptr_heap.
/// @param ptr_heap the pointer.
/// @return Newly allocated heap header.
- voidPtr mm_realloc_heap(voidPtr ptr_heap, SizeT new_sz)
+ VoidPtr mm_realloc_heap(VoidPtr ptr_heap, SizeT new_sz)
{
if (Detail::mm_check_heap_address(ptr_heap) == No)
return nullptr;
@@ -123,8 +113,6 @@ namespace Kernel
/// @return The newly allocated pointer.
VoidPtr mm_new_heap(const SizeT sz, const bool wr, const bool user)
{
- Detail::mm_alloc_init_timeout();
-
auto sz_fix = sz;
if (sz_fix == 0)
@@ -154,8 +142,6 @@ namespace Kernel
kLatestAllocation = heap_info_ptr;
- Detail::mm_alloc_fini_timeout();
-
return result;
}
@@ -167,8 +153,6 @@ namespace Kernel
if (Detail::mm_check_heap_address(heap_ptr) == No)
return -kErrorHeapNotPresent;
- Detail::mm_alloc_init_timeout();
-
Detail::HEAP_INFORMATION_BLOCK_PTR heap_blk =
reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
(UIntPtr)heap_ptr - sizeof(Detail::HEAP_INFORMATION_BLOCK));
@@ -178,8 +162,6 @@ namespace Kernel
heap_blk->fPage = true;
- Detail::mm_alloc_fini_timeout();
-
return kErrorSuccess;
}
@@ -191,8 +173,6 @@ namespace Kernel
if (Detail::mm_check_heap_address(heap_ptr) == No)
return -kErrorHeapNotPresent;
- Detail::mm_alloc_init_timeout();
-
Detail::HEAP_INFORMATION_BLOCK_PTR heap_blk =
reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>(
(UIntPtr)(heap_ptr) - sizeof(Detail::HEAP_INFORMATION_BLOCK));
@@ -201,7 +181,6 @@ namespace Kernel
{
if (!heap_blk->fPresent)
{
- Detail::mm_alloc_fini_timeout();
return -kErrorHeapNotPresent;
}
@@ -234,8 +213,6 @@ namespace Kernel
PageMgr heap_mgr;
heap_mgr.Free(pteAddress);
- Detail::mm_alloc_fini_timeout();
-
return kErrorSuccess;
}