mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Kernel: Consolidate API for creating AnonymousVMObject with given pages
We don't need to have a dedicated API for creating a VMObject with a single page, the multi-page API option works in all cases. Also make the API take a Span<NonnullRefPtr<PhysicalPage>> instead of a NonnullRefPtrVector<PhysicalPage>.
This commit is contained in:
parent
9e15708aa0
commit
5217875f6a
7 changed files with 10 additions and 23 deletions
|
@ -23,8 +23,7 @@ public:
|
|||
|
||||
static RefPtr<AnonymousVMObject> try_create_with_size(size_t, AllocationStrategy);
|
||||
static RefPtr<AnonymousVMObject> try_create_for_physical_range(PhysicalAddress paddr, size_t size);
|
||||
static RefPtr<AnonymousVMObject> try_create_with_physical_page(PhysicalPage& page);
|
||||
static RefPtr<AnonymousVMObject> try_create_with_physical_pages(NonnullRefPtrVector<PhysicalPage>);
|
||||
static RefPtr<AnonymousVMObject> try_create_with_physical_pages(Span<NonnullRefPtr<PhysicalPage>>);
|
||||
virtual RefPtr<VMObject> try_clone() override;
|
||||
|
||||
RefPtr<PhysicalPage> allocate_committed_page(size_t);
|
||||
|
@ -118,8 +117,7 @@ public:
|
|||
private:
|
||||
explicit AnonymousVMObject(size_t, AllocationStrategy);
|
||||
explicit AnonymousVMObject(PhysicalAddress, size_t);
|
||||
explicit AnonymousVMObject(PhysicalPage&);
|
||||
explicit AnonymousVMObject(NonnullRefPtrVector<PhysicalPage>);
|
||||
explicit AnonymousVMObject(Span<NonnullRefPtr<PhysicalPage>>);
|
||||
explicit AnonymousVMObject(AnonymousVMObject const&);
|
||||
|
||||
virtual StringView class_name() const override { return "AnonymousVMObject"sv; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue