1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

Kernel: Tidy up Memory::AddressSpace construction

- Return KResultOr<T> in places
- Propagate errors
- Use TRY()
This commit is contained in:
Andreas Kling 2021-09-05 15:13:20 +02:00
parent 0cf65cf7ec
commit 83fed5b2de
6 changed files with 16 additions and 30 deletions

View file

@ -19,7 +19,7 @@ class PageDirectory : public RefCounted<PageDirectory> {
friend class MemoryManager;
public:
static RefPtr<PageDirectory> try_create_for_userspace(VirtualRangeAllocator const* parent_range_allocator = nullptr);
static KResultOr<NonnullRefPtr<PageDirectory>> try_create_for_userspace(VirtualRangeAllocator const* parent_range_allocator = nullptr);
static NonnullRefPtr<PageDirectory> must_create_kernel_page_directory();
static RefPtr<PageDirectory> find_by_cr3(FlatPtr);