Kernel: Remove infallible VMObject resource factory functions

These infallible resource factory functions were only there to ease the
conversion to the new factory functions. Since all child classes of
VMObject now use the fallible resource factory functions, we don't
need the infallible versions anymore.
This commit is contained in:
creator1creeper1 2022-01-12 20:57:07 +01:00 committed by Idan Horowitz
parent 2a4e410b63
commit 1a2f71581b
2 changed files with 0 additions and 12 deletions

View file

@ -22,21 +22,11 @@ ErrorOr<FixedArray<RefPtr<PhysicalPage>>> VMObject::try_clone_physical_pages() c
return m_physical_pages.try_clone();
}
FixedArray<RefPtr<PhysicalPage>> VMObject::must_clone_physical_pages_but_fixme_should_propagate_errors() const
{
return MUST(try_clone_physical_pages());
}
ErrorOr<FixedArray<RefPtr<PhysicalPage>>> VMObject::try_create_physical_pages(size_t size)
{
return FixedArray<RefPtr<PhysicalPage>>::try_create(ceil_div(size, static_cast<size_t>(PAGE_SIZE)));
}
FixedArray<RefPtr<PhysicalPage>> VMObject::must_create_physical_pages_but_fixme_should_propagate_errors(size_t size)
{
return MUST(try_create_physical_pages(size));
}
VMObject::VMObject(FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages)
: m_physical_pages(move(new_physical_pages))
{

View file

@ -55,9 +55,7 @@ public:
protected:
static ErrorOr<FixedArray<RefPtr<PhysicalPage>>> try_create_physical_pages(size_t);
static FixedArray<RefPtr<PhysicalPage>> must_create_physical_pages_but_fixme_should_propagate_errors(size_t);
ErrorOr<FixedArray<RefPtr<PhysicalPage>>> try_clone_physical_pages() const;
FixedArray<RefPtr<PhysicalPage>> must_clone_physical_pages_but_fixme_should_propagate_errors() const;
explicit VMObject(FixedArray<RefPtr<PhysicalPage>>&&);
template<typename Callback>