diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-30 18:17:10 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-30 18:17:47 +0200 |
| commit | 659435af7da4ffb15a309063c892b518707fa9d0 (patch) | |
| tree | b990bf74ae55bafcc1441632ef20a062f974ff08 /Kernel/Sources | |
| parent | 01fb3ca21dd5846ecd7e4e94571ede5a5264d9a6 (diff) | |
[REFACTOR] refactor namespaces.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources')
| -rw-r--r-- | Kernel/Sources/Heap.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Kernel/Sources/Heap.cxx b/Kernel/Sources/Heap.cxx index 25a77d6b..f24eda56 100644 --- a/Kernel/Sources/Heap.cxx +++ b/Kernel/Sources/Heap.cxx @@ -21,7 +21,7 @@ namespace Kernel STATIC SizeT kHeapCount = 0UL; STATIC PageManager kHeapPageManager; - namespace Details + namespace Detail { /// @brief Kernel heap information block. /// Located before the address bytes. @@ -55,9 +55,9 @@ namespace Kernel if (!allocatedPtr || newSz < 1) return nullptr; - Details::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( - (UIntPtr)allocatedPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)); + Detail::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( + (UIntPtr)allocatedPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)); heapInfoBlk->fTargetPtrSize = newSz; @@ -83,8 +83,8 @@ namespace Kernel auto wrapper = kHeapPageManager.Request(rw, user, false, szFix); - Details::HEAP_INFORMATION_BLOCK_PTR heapInfo = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( + Detail::HEAP_INFORMATION_BLOCK_PTR heapInfo = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( wrapper.VirtualAddress()); heapInfo->fTargetPtrSize = szFix; @@ -96,7 +96,7 @@ namespace Kernel ++kHeapCount; return reinterpret_cast<VoidPtr>(wrapper.VirtualAddress() + - sizeof(Details::HEAP_INFORMATION_BLOCK)); + sizeof(Detail::HEAP_INFORMATION_BLOCK)); } /// @brief Makes a page heap. @@ -106,14 +106,14 @@ namespace Kernel { if (kHeapCount < 1) return -kErrorInternal; - if (((IntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)) <= 0) + if (((IntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)) <= 0) return -kErrorInternal; if (((IntPtr)heapPtr - kBadPtr) < 0) return -kErrorInternal; - Details::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( - (UIntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)); + Detail::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( + (UIntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)); heapInfoBlk->fPagePtr = 1; @@ -127,14 +127,14 @@ namespace Kernel { if (kHeapCount < 1) return -kErrorInternal; - if (((IntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)) <= 0) + if (((IntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)) <= 0) return -kErrorInternal; if (((IntPtr)heapPtr - kBadPtr) < 0) return -kErrorInternal; - Details::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( - (UIntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)); + Detail::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( + (UIntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)); if (heapInfoBlk && heapInfoBlk->fMagic == kKernelHeapMagic) { @@ -181,9 +181,9 @@ namespace Kernel if (heapPtr) { - Details::HEAP_INFORMATION_BLOCK_PTR virtualAddress = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( - (UIntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)); + Detail::HEAP_INFORMATION_BLOCK_PTR virtualAddress = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( + (UIntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)); if (virtualAddress->fPresent && virtualAddress->fMagic == kKernelHeapMagic) { @@ -201,9 +201,9 @@ namespace Kernel { if (heapPtr) { - Details::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = - reinterpret_cast<Details::HEAP_INFORMATION_BLOCK_PTR>( - (UIntPtr)heapPtr - sizeof(Details::HEAP_INFORMATION_BLOCK)); + Detail::HEAP_INFORMATION_BLOCK_PTR heapInfoBlk = + reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( + (UIntPtr)heapPtr - sizeof(Detail::HEAP_INFORMATION_BLOCK)); if (heapInfoBlk->fPresent && kKernelHeapMagic == heapInfoBlk->fMagic) { |
