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

Kernel: Use NonnullRefPtrVector<T> instead of Vector<RefPtr<T>> some

This commit is contained in:
Andreas Kling 2020-05-08 20:15:01 +02:00
parent bd12f132f3
commit d74650e80d
4 changed files with 9 additions and 11 deletions

View file

@ -27,7 +27,7 @@
#pragma once
#include <AK/Bitmap.h>
#include <AK/NonnullRefPtr.h>
#include <AK/NonnullRefPtrVector.h>
#include <AK/Optional.h>
#include <AK/RefCounted.h>
#include <Kernel/VM/PhysicalPage.h>
@ -52,7 +52,7 @@ public:
bool contains(PhysicalPage& page) const { return page.paddr() >= m_lower && page.paddr() <= m_upper; }
RefPtr<PhysicalPage> take_free_page(bool supervisor);
Vector<RefPtr<PhysicalPage>> take_contiguous_free_pages(size_t count, bool supervisor);
NonnullRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count, bool supervisor);
void return_page_at(PhysicalAddress addr);
void return_page(PhysicalPage&& page) { return_page_at(page.paddr()); }