diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-04 23:36:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-05 01:15:22 +0200 |
commit | e3e1d79a7d92b931892ecbe26761363b41cf6e96 (patch) | |
tree | 23cea90ebafb3493f8ddcd8fa395f9d00cc7589c /Kernel/Memory/AddressSpace.cpp | |
parent | b36c3a68d8a034d15e4b9164e5d4d4cb82c0cbc7 (diff) | |
download | serenity-e3e1d79a7d92b931892ecbe26761363b41cf6e96.zip |
Kernel: Remove unused ShouldDeallocateVirtualRange parameters
Since there is no separate virtual range allocator anymore, this is
no longer used for anything.
Diffstat (limited to 'Kernel/Memory/AddressSpace.cpp')
-rw-r--r-- | Kernel/Memory/AddressSpace.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp index a91bd45f96..50adbb9f29 100644 --- a/Kernel/Memory/AddressSpace.cpp +++ b/Kernel/Memory/AddressSpace.cpp @@ -71,11 +71,9 @@ ErrorOr<void> AddressSpace::unmap_mmap_range(VirtualAddress addr, size_t size) return EPERM; // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but don't deallocate it yet. + // with the exact same start address. auto region = take_region(*old_region); - - // We manually unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Region::ShouldDeallocateVirtualRange::No); + region->unmap(); auto new_regions = TRY(try_split_region_around_range(*region, range_to_unmap)); @@ -113,11 +111,9 @@ ErrorOr<void> AddressSpace::unmap_mmap_range(VirtualAddress addr, size_t size) } // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but don't deallocate it yet. + // with the exact same start address. auto region = take_region(*old_region); - - // We manually unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Region::ShouldDeallocateVirtualRange::No); + region->unmap(); // Otherwise, split the regions and collect them for future mapping. auto split_regions = TRY(try_split_region_around_range(*region, range_to_unmap)); @@ -339,7 +335,7 @@ void AddressSpace::remove_all_regions(Badge<Process>) SpinlockLocker pd_locker(m_page_directory->get_lock()); SpinlockLocker mm_locker(s_mm_lock); for (auto& region : m_region_tree.regions()) - region.unmap_with_locks_held(Region::ShouldDeallocateVirtualRange::No, ShouldFlushTLB::No, pd_locker, mm_locker); + region.unmap_with_locks_held(ShouldFlushTLB::No, pd_locker, mm_locker); } m_region_tree.delete_all_regions_assuming_they_are_unmapped(); |