mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
Kernel: Convert MemoryManager::allocate_user_physical_page to ErrorOr
This allows is to use the TRY macro at the call sites, instead of using clunky null checks.
This commit is contained in:
parent
bd5b56cab0
commit
5146315a15
Notes:
sideshowbarker
2024-07-17 20:05:45 +09:00
Author: https://github.com/IdanHo
Commit: 5146315a15
Pull-request: https://github.com/SerenityOS/serenity/pull/12179
6 changed files with 20 additions and 23 deletions
|
@ -171,7 +171,7 @@ public:
|
|||
void uncommit_user_physical_pages(Badge<CommittedPhysicalPageSet>, size_t page_count);
|
||||
|
||||
NonnullRefPtr<PhysicalPage> allocate_committed_user_physical_page(Badge<CommittedPhysicalPageSet>, ShouldZeroFill = ShouldZeroFill::Yes);
|
||||
RefPtr<PhysicalPage> allocate_user_physical_page(ShouldZeroFill = ShouldZeroFill::Yes, bool* did_purge = nullptr);
|
||||
ErrorOr<NonnullRefPtr<PhysicalPage>> allocate_user_physical_page(ShouldZeroFill = ShouldZeroFill::Yes, bool* did_purge = nullptr);
|
||||
ErrorOr<NonnullRefPtr<PhysicalPage>> allocate_supervisor_physical_page();
|
||||
ErrorOr<NonnullRefPtrVector<PhysicalPage>> allocate_contiguous_supervisor_physical_pages(size_t size);
|
||||
void deallocate_physical_page(PhysicalAddress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue