diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-30 20:56:19 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-30 20:56:19 +0100 |
| commit | e02c25872a51595954da9eb33a321a7d7ed7e5d2 (patch) | |
| tree | d3fff54b2ff74a5916d0f1b270ec2e8dfa490b79 /dev/Kernel/src/Heap.cc | |
| parent | 224e747b04022a5b8f8577fd730e907febf90a75 (diff) | |
IMPL: Process scheduler and bit map mgr fixes.
- Finally got it working, at least before execution, need to fix
the VMMgr now.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src/Heap.cc')
| -rw-r--r-- | dev/Kernel/src/Heap.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/dev/Kernel/src/Heap.cc b/dev/Kernel/src/Heap.cc index 3f3d05c5..6f955078 100644 --- a/dev/Kernel/src/Heap.cc +++ b/dev/Kernel/src/Heap.cc @@ -136,7 +136,7 @@ namespace Kernel heap_info_ptr->fHeapSize = sz_fix; heap_info_ptr->fMagic = kKernelHeapMagic; - heap_info_ptr->fCRC32 = No; // dont fill it for now. + heap_info_ptr->fCRC32 = 0; // dont fill it for now. heap_info_ptr->fHeapPtr = reinterpret_cast<UIntPtr>(heap_info_ptr) + sizeof(Detail::HEAP_INFORMATION_BLOCK); heap_info_ptr->fPagePtr = No; heap_info_ptr->fWriteRead = wr; @@ -227,19 +227,6 @@ namespace Kernel return kErrorHeapNotPresent; } - if (heap_info_ptr->fCRC32 != 0) - { - if (heap_info_ptr->fCRC32 != - ke_calculate_crc32((Char*)heap_info_ptr->fHeapPtr, - heap_info_ptr->fHeapSize)) - { - if (!heap_info_ptr->fUser) - { - ke_panic(RUNTIME_CHECK_POINTER); - } - } - } - heap_info_ptr->fHeapSize = 0UL; heap_info_ptr->fPresent = No; heap_info_ptr->fHeapPtr = 0; @@ -275,6 +262,13 @@ namespace Kernel if (heap_info_ptr && heap_info_ptr->fPresent && heap_info_ptr->fMagic == kKernelHeapMagic) { + if (heap_info_ptr->fCRC32 != + ke_calculate_crc32((Char*)heap_info_ptr->fHeapPtr, + heap_info_ptr->fHeapSize)) + { + return No; + } + return Yes; } } |
