From bfd4647467ddd6e846b7f951148a24db0bbe13fb Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 5 Dec 2022 13:26:09 +0100 Subject: [PATCH] Rename largest_free -> largest_free_entry --- kernel/src/memory/MemoryManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 34cc8f91..1a03cfca 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -53,9 +53,9 @@ namespace MemoryManager MemoryMapIterator iter; MemoryMapEntry entry; - const auto largest_free = iter.largest_free(); + const auto largest_free_entry = iter.largest_free(); - expect(largest_free.is_free(), "We were given a largest free memory region that isn't even free!"); + expect(largest_free_entry.is_free(), "We were given a largest free memory region that isn't even free!"); // The entire physical address space. May contain inexistent memory holes, thus differs from total_mem which // only counts existent memory. Our bitmap needs to have space for all of the physical address space, since @@ -63,13 +63,14 @@ namespace MemoryManager const usize physical_address_space_size = get_physical_address_space_size(); // We store our frame bitmap at the beginning of the largest free memory block. - char* const frame_bitmap_addr = (char*)largest_free.ptr(); + char* const frame_bitmap_addr = (char*)largest_free_entry.ptr(); const usize frame_bitmap_size = get_blocks_from_size(physical_address_space_size / ARCH_PAGE_SIZE, 8UL); // This should never happen, unless memory is very fragmented. Usually there is always a very big block of // usable memory and then some tiny blocks around it. - expect(frame_bitmap_size < largest_free.size(), "No single memory region is enough to hold the frame bitmap"); + expect(frame_bitmap_size < largest_free_entry.size(), + "No single memory region is enough to hold the frame bitmap"); g_frame_bitmap.initialize(frame_bitmap_addr, frame_bitmap_size); @@ -89,7 +90,7 @@ namespace MemoryManager } // Make sure that the physical frames used by the bitmap aren't handed out to anyone else. - lock_frames(largest_free.address(), get_blocks_from_size(frame_bitmap_size, ARCH_PAGE_SIZE)); + lock_frames(largest_free_entry.address(), get_blocks_from_size(frame_bitmap_size, ARCH_PAGE_SIZE)); } void init()