mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 08:17:30 +03:00
Kernel: Don't ref-count UsedMemoryRange during iteration
This commit is contained in:
parent
8f2ddde4cb
commit
7078119c58
Notes:
sideshowbarker
2024-07-18 18:00:48 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/7078119c589 Pull-request: https://github.com/SerenityOS/serenity/pull/6277 Reviewed-by: https://github.com/ElectrodeYT Reviewed-by: https://github.com/awesomekling
@ -46,7 +46,7 @@ RamdiskController::RamdiskController()
|
||||
{
|
||||
// Populate ramdisk controllers from Multiboot boot modules, if any.
|
||||
size_t count = 0;
|
||||
for (auto used_memory_range : MemoryManager::the().used_memory_ranges()) {
|
||||
for (auto& used_memory_range : MemoryManager::the().used_memory_ranges()) {
|
||||
if (used_memory_range.type == UsedMemoryRangeType::BootModule) {
|
||||
size_t length = page_round_up(used_memory_range.end.get()) - used_memory_range.start.get();
|
||||
auto region = MemoryManager::the().allocate_kernel_region(used_memory_range.start, length, "Ramdisk", Region::Access::Read | Region::Access::Write);
|
||||
|
Loading…
Reference in New Issue
Block a user