mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Kernel: Make AnonymousVMObject physical page APIs OOM safe
AnonymousVMObject::create_with_physical_page(s) can't be NonnullRefPtr as it allocates internally. Fixing the API then surfaced an issue in ScatterGatherList, where the code was attempting to create an AnonymousVMObject in the constructor which will not be observable during OOM. Fix all of these issues and start propagating errors at the callers of the AnonymousVMObject and ScatterGatherList APis.
This commit is contained in:
parent
d45db06826
commit
a324d4d6a3
6 changed files with 20 additions and 13 deletions
|
@ -22,8 +22,8 @@ public:
|
|||
|
||||
static RefPtr<AnonymousVMObject> create_with_size(size_t, AllocationStrategy);
|
||||
static RefPtr<AnonymousVMObject> create_for_physical_range(PhysicalAddress paddr, size_t size);
|
||||
static NonnullRefPtr<AnonymousVMObject> create_with_physical_page(PhysicalPage& page);
|
||||
static NonnullRefPtr<AnonymousVMObject> create_with_physical_pages(NonnullRefPtrVector<PhysicalPage>);
|
||||
static RefPtr<AnonymousVMObject> create_with_physical_page(PhysicalPage& page);
|
||||
static RefPtr<AnonymousVMObject> create_with_physical_pages(NonnullRefPtrVector<PhysicalPage>);
|
||||
virtual RefPtr<VMObject> clone() override;
|
||||
|
||||
RefPtr<PhysicalPage> allocate_committed_page(size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue