diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-23 11:12:31 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-23 11:13:38 +0200 |
| commit | 54a0f4c49d9bfb955174c87dae2f442d7f5a8b25 (patch) | |
| tree | ad59d31c9444fcfc6d5f0da7b17c8843710e6014 /dev/kernel/src/BitMapMgr.cc | |
| parent | fc67c4af554189c941c811486a0b2b21aa3f54ea (diff) | |
feat!(Kernel): Improvements on the BitMapMgr, HTS, and UPS.
other:
- Add ZXD header file.
- Reworking AMD64 interrupts.
- Improved HTS's design implementation.
- Improved UPS's balancing implementation.
breaking changes:
- Rename MemoryMgr to HeapMgr.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/BitMapMgr.cc')
| -rw-r--r-- | dev/kernel/src/BitMapMgr.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dev/kernel/src/BitMapMgr.cc b/dev/kernel/src/BitMapMgr.cc index 994a2ba8..4301ce5b 100644 --- a/dev/kernel/src/BitMapMgr.cc +++ b/dev/kernel/src/BitMapMgr.cc @@ -136,7 +136,6 @@ namespace HAL { return; } -#ifdef __NE_VERBOSE_BITMAP__ (Void)(kout << "Magic: " << hex_number(ptr_bit_set[kBitMapMagIdx]) << kendl); (Void)(kout << "Is Allocated? " << (ptr_bit_set[kBitMapUsedIdx] ? "YES" : "NO") << kendl); (Void)(kout << "Size of BitMap (B): " << number(ptr_bit_set[kBitMapSizeIdx]) << kendl); @@ -149,7 +148,6 @@ namespace HAL { (Void)(kout << "Size of BitMap (TIB): " << number(TIB(ptr_bit_set[kBitMapSizeIdx])) << kendl); (Void)(kout << "BitMap Address: " << hex_number((UIntPtr) ptr_bit_set) << kendl); -#endif } }; } // namespace Detail @@ -172,7 +170,13 @@ namespace HAL { if (is_page) return nullptr; ptr_new = bitmp.FindBitMap(kKernelBitMpStart, size, wr, user, pad); - return (UIntPtr*) ptr_new; + + if (!ptr_new) { + ke_panic(RUNTIME_CHECK_VIRTUAL_OUT_OF_MEM, "Out of memory bitmap"); + return nullptr; + } + + return ptr_new; } /***********************************************************************************/ |
