mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
Kernel: Make contiguous VM objects use "user physical pages" by default
If someone specifically wants contiguous memory in the low-physical- address-for-DMA range ("super pages"), they can use the allocate_dma_buffer_pages() helper.
This commit is contained in:
parent
5ff816abbf
commit
2ff9db0245
3 changed files with 24 additions and 1 deletions
|
@ -82,7 +82,7 @@ ErrorOr<NonnullRefPtr<AnonymousVMObject>> AnonymousVMObject::try_create_with_siz
|
|||
|
||||
ErrorOr<NonnullRefPtr<AnonymousVMObject>> AnonymousVMObject::try_create_physically_contiguous_with_size(size_t size)
|
||||
{
|
||||
auto contiguous_physical_pages = TRY(MM.allocate_contiguous_supervisor_physical_pages(size));
|
||||
auto contiguous_physical_pages = TRY(MM.allocate_contiguous_user_physical_pages(size));
|
||||
|
||||
auto new_physical_pages = TRY(FixedArray<RefPtr<PhysicalPage>>::try_create(contiguous_physical_pages.span()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue