mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
Kernel: Make SharedInodeVMObject pages Bitmap allocation OOM-fallible
This commit is contained in:
@@ -9,17 +9,17 @@
|
||||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
InodeVMObject::InodeVMObject(Inode& inode, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages)
|
||||
InodeVMObject::InodeVMObject(Inode& inode, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages, Bitmap dirty_pages)
|
||||
: VMObject(move(new_physical_pages))
|
||||
, m_inode(inode)
|
||||
, m_dirty_pages(Bitmap::try_create(page_count(), false).release_value_but_fixme_should_propagate_errors())
|
||||
, m_dirty_pages(move(dirty_pages))
|
||||
{
|
||||
}
|
||||
|
||||
InodeVMObject::InodeVMObject(InodeVMObject const& other, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages)
|
||||
InodeVMObject::InodeVMObject(InodeVMObject const& other, FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages, Bitmap dirty_pages)
|
||||
: VMObject(move(new_physical_pages))
|
||||
, m_inode(other.m_inode)
|
||||
, m_dirty_pages(Bitmap::try_create(page_count(), false).release_value_but_fixme_should_propagate_errors())
|
||||
, m_dirty_pages(move(dirty_pages))
|
||||
{
|
||||
for (size_t i = 0; i < page_count(); ++i)
|
||||
m_dirty_pages.set(i, other.m_dirty_pages.get(i));
|
||||
|
||||
Reference in New Issue
Block a user