mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Kernel: Make AnonymousVMObject construction OOM-aware
This commit moves the allocation of the resources required for AnonymousVMObject from its constructors to its factory functions. We're making this change to expose the fallibility of the allocation.
This commit is contained in:
parent
d1f265e851
commit
3879e70447
2 changed files with 28 additions and 21 deletions
|
@ -41,10 +41,10 @@ public:
|
|||
private:
|
||||
class SharedCommittedCowPages;
|
||||
|
||||
explicit AnonymousVMObject(size_t, AllocationStrategy, Optional<CommittedPhysicalPageSet>);
|
||||
explicit AnonymousVMObject(PhysicalAddress, size_t);
|
||||
explicit AnonymousVMObject(Span<NonnullRefPtr<PhysicalPage>>);
|
||||
explicit AnonymousVMObject(AnonymousVMObject const&, NonnullRefPtr<SharedCommittedCowPages>);
|
||||
explicit AnonymousVMObject(FixedArray<RefPtr<PhysicalPage>>&&, AllocationStrategy, Optional<CommittedPhysicalPageSet>);
|
||||
explicit AnonymousVMObject(PhysicalAddress, FixedArray<RefPtr<PhysicalPage>>&&);
|
||||
explicit AnonymousVMObject(FixedArray<RefPtr<PhysicalPage>>&&);
|
||||
explicit AnonymousVMObject(AnonymousVMObject const&, NonnullRefPtr<SharedCommittedCowPages>, FixedArray<RefPtr<PhysicalPage>>&&);
|
||||
|
||||
virtual StringView class_name() const override { return "AnonymousVMObject"sv; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue