mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
Kernel: Don't ref-count UsedMemoryRange during iteration
This commit is contained in:
parent
8f2ddde4cb
commit
7078119c58
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue