diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-05 15:13:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-05 15:13:20 +0200 |
commit | 83fed5b2de58e7ad9dc2da1f15dd5cf0e052cadd (patch) | |
tree | 1c6d3d99d74f40387e78b9dc2e7a8318a6a58877 /Kernel/Memory/PageDirectory.h | |
parent | 0cf65cf7ec5513dc972f51e2bdc95ca7f983064b (diff) | |
download | serenity-83fed5b2de58e7ad9dc2da1f15dd5cf0e052cadd.zip |
Kernel: Tidy up Memory::AddressSpace construction
- Return KResultOr<T> in places
- Propagate errors
- Use TRY()
Diffstat (limited to 'Kernel/Memory/PageDirectory.h')
-rw-r--r-- | Kernel/Memory/PageDirectory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Memory/PageDirectory.h b/Kernel/Memory/PageDirectory.h index 6d6e8e9036..348f43857b 100644 --- a/Kernel/Memory/PageDirectory.h +++ b/Kernel/Memory/PageDirectory.h @@ -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); |