mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-20 18:12:53 +00:00
Kernel: Remove API for requesting physical allocation alignment
Nobody was using this API to request anythign about `PAGE_SIZE` alignment, so let's get rid of it for now. We can reimplement it if we end up needing it. Also note that it wasn't actually used anywhere.
This commit is contained in:
parent
ba87571366
commit
be90e51355
Notes:
sideshowbarker
2024-07-18 09:07:30 +09:00
Author: https://github.com/awesomekling
Commit: be90e51355
6 changed files with 11 additions and 14 deletions
|
@ -629,14 +629,14 @@ PageFaultResponse MemoryManager::handle_page_fault(const PageFault& fault)
|
|||
return region->handle_fault(fault, lock);
|
||||
}
|
||||
|
||||
OwnPtr<Region> MemoryManager::allocate_contiguous_kernel_region(size_t size, StringView name, Region::Access access, size_t physical_alignment, Region::Cacheable cacheable)
|
||||
OwnPtr<Region> MemoryManager::allocate_contiguous_kernel_region(size_t size, StringView name, Region::Access access, Region::Cacheable cacheable)
|
||||
{
|
||||
VERIFY(!(size % PAGE_SIZE));
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
auto range = kernel_page_directory().range_allocator().allocate_anywhere(size);
|
||||
if (!range.has_value())
|
||||
return {};
|
||||
auto vmobject = ContiguousVMObject::try_create_with_size(size, physical_alignment);
|
||||
auto vmobject = ContiguousVMObject::try_create_with_size(size);
|
||||
if (!vmobject) {
|
||||
kernel_page_directory().range_allocator().deallocate(range.value());
|
||||
return {};
|
||||
|
@ -834,7 +834,7 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
|
|||
return page;
|
||||
}
|
||||
|
||||
NonnullRefPtrVector<PhysicalPage> MemoryManager::allocate_contiguous_supervisor_physical_pages(size_t size, size_t physical_alignment)
|
||||
NonnullRefPtrVector<PhysicalPage> MemoryManager::allocate_contiguous_supervisor_physical_pages(size_t size)
|
||||
{
|
||||
VERIFY(!(size % PAGE_SIZE));
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
|
@ -842,7 +842,7 @@ NonnullRefPtrVector<PhysicalPage> MemoryManager::allocate_contiguous_supervisor_
|
|||
NonnullRefPtrVector<PhysicalPage> physical_pages;
|
||||
|
||||
for (auto& region : m_super_physical_regions) {
|
||||
physical_pages = region.take_contiguous_free_pages(count, physical_alignment);
|
||||
physical_pages = region.take_contiguous_free_pages(count);
|
||||
if (!physical_pages.is_empty())
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue