summaryrefslogtreecommitdiff
path: root/Kernel/VM/PageDirectory.h
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-07-07 19:50:05 -0600
committerAndreas Kling <kling@serenityos.org>2021-07-08 11:43:34 +0200
commit87dc4c3d2c21762d85c77b7b9588ff889cafb5ac (patch)
tree03b6c4ca2c580060e3d0c2a1ffe398c5b53a51ac /Kernel/VM/PageDirectory.h
parentad5d9d648b835f665e7a3e3eb0847c651d9c8c20 (diff)
downloadserenity-87dc4c3d2c21762d85c77b7b9588ff889cafb5ac.zip
Kernel: Move PhysicalPage classes out of the heap into an array
By moving the PhysicalPage classes out of the kernel heap into a static array, one for each physical page, we can avoid the added overhead and easily find them by indexing into an array. This also wraps the PhysicalPage into a PhysicalPageEntry, which allows us to re-use each slot with information where to find the next free page.
Diffstat (limited to 'Kernel/VM/PageDirectory.h')
-rw-r--r--Kernel/VM/PageDirectory.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/VM/PageDirectory.h b/Kernel/VM/PageDirectory.h
index c06066cc4a..6c02c03e12 100644
--- a/Kernel/VM/PageDirectory.h
+++ b/Kernel/VM/PageDirectory.h
@@ -32,6 +32,8 @@ public:
~PageDirectory();
+ void allocate_kernel_directory();
+
FlatPtr cr3() const
{
#if ARCH(X86_64)