1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel: Make SharedInodeVMObject construction OOM-aware

This commit moves the allocation of the resources required for
SharedInodeVMObject from its constructors to its factory functions.

We're making this change to expose the fallibility of the allocation.
This commit is contained in:
creator1creeper1 2022-01-12 20:52:39 +01:00 committed by Idan Horowitz
parent 9a1dfe70fe
commit 2a4e410b63
2 changed files with 10 additions and 8 deletions

View file

@ -23,8 +23,8 @@ public:
private:
virtual bool is_shared_inode() const override { return true; }
explicit SharedInodeVMObject(Inode&, size_t);
explicit SharedInodeVMObject(SharedInodeVMObject const&);
explicit SharedInodeVMObject(Inode&, FixedArray<RefPtr<PhysicalPage>>&&);
explicit SharedInodeVMObject(SharedInodeVMObject const&, FixedArray<RefPtr<PhysicalPage>>&&);
virtual StringView class_name() const override { return "SharedInodeVMObject"sv; }