mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +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
Notes:
sideshowbarker
2024-07-17 20:50:18 +09:00
Author: https://github.com/creator1creeper1
Commit: 3879e70447
Pull-request: https://github.com/SerenityOS/serenity/pull/11843
Reviewed-by: https://github.com/IdanHo ✅
Reviewed-by: https://github.com/bgianfo
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