mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 18:15:09 +00:00
Kernel: Make committed physical page allocation return NonnullRefPtr
Since we're taking from the committed set of pages, there should never be a reason for this call to fail. Also add a Badge to disallow taking committed pages from anywhere but the Region class.
This commit is contained in:
parent
d79d768010
commit
0642f8f2c6
3 changed files with 6 additions and 4 deletions
|
@ -26,7 +26,7 @@ public:
|
|||
static RefPtr<AnonymousVMObject> try_create_with_physical_pages(Span<NonnullRefPtr<PhysicalPage>>);
|
||||
virtual RefPtr<VMObject> try_clone() override;
|
||||
|
||||
RefPtr<PhysicalPage> allocate_committed_page(size_t);
|
||||
[[nodiscard]] NonnullRefPtr<PhysicalPage> allocate_committed_page(Badge<Region>, size_t);
|
||||
PageFaultResponse handle_cow_fault(size_t, VirtualAddress);
|
||||
size_t cow_pages() const;
|
||||
bool should_cow(size_t page_index, bool) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue