mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 16:42:54 +00:00
Kernel: Remove ContiguousVMObject, let AnonymousVMObject do the job
We don't need an entirely separate VMObject subclass to influence the location of the physical pages. Instead, we simply allocate enough physically contiguous memory first, and then pass it to the AnonymousVMObject constructor that takes a span of physical pages.
This commit is contained in:
parent
9a701eafc4
commit
6a537ceef1
Notes:
sideshowbarker
2024-07-18 08:21:13 +09:00
Author: https://github.com/awesomekling
Commit: 6a537ceef1
10 changed files with 18 additions and 89 deletions
|
@ -11,14 +11,14 @@ namespace Kernel::USB {
|
|||
|
||||
RefPtr<Transfer> Transfer::try_create(Pipe& pipe, u16 len)
|
||||
{
|
||||
auto vmobject = ContiguousVMObject::try_create_with_size(PAGE_SIZE);
|
||||
auto vmobject = AnonymousVMObject::try_create_physically_contiguous_with_size(PAGE_SIZE);
|
||||
if (!vmobject)
|
||||
return nullptr;
|
||||
|
||||
return AK::try_create<Transfer>(pipe, len, *vmobject);
|
||||
}
|
||||
|
||||
Transfer::Transfer(Pipe& pipe, u16 len, ContiguousVMObject& vmobject)
|
||||
Transfer::Transfer(Pipe& pipe, u16 len, AnonymousVMObject& vmobject)
|
||||
: m_pipe(pipe)
|
||||
, m_transfer_data_size(len)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue