mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:24:58 +00:00
Kernel: Make InodeVMOBject construction OOM-aware
This commit moves the allocation of the resources required for InodeVMObject from its constructors to the constructors of its child classes. We're making this change to give the child classes the chance to expose the fallibility of the allocation.
This commit is contained in:
parent
3879e70447
commit
ad480ff18b
4 changed files with 10 additions and 10 deletions
|
@ -20,12 +20,12 @@ ErrorOr<NonnullRefPtr<VMObject>> PrivateInodeVMObject::try_clone()
|
|||
}
|
||||
|
||||
PrivateInodeVMObject::PrivateInodeVMObject(Inode& inode, size_t size)
|
||||
: InodeVMObject(inode, size)
|
||||
: InodeVMObject(inode, VMObject::must_create_physical_pages_but_fixme_should_propagate_errors(size))
|
||||
{
|
||||
}
|
||||
|
||||
PrivateInodeVMObject::PrivateInodeVMObject(PrivateInodeVMObject const& other)
|
||||
: InodeVMObject(other)
|
||||
: InodeVMObject(other, other.must_clone_physical_pages_but_fixme_should_propagate_errors())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue