diff options
author | Tom <tomut@yahoo.com> | 2021-07-07 19:50:05 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-08 11:43:34 +0200 |
commit | 87dc4c3d2c21762d85c77b7b9588ff889cafb5ac (patch) | |
tree | 03b6c4ca2c580060e3d0c2a1ffe398c5b53a51ac /Kernel/VM/PageDirectory.h | |
parent | ad5d9d648b835f665e7a3e3eb0847c651d9c8c20 (diff) | |
download | serenity-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.h | 2 |
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) |