1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

Kernel: Make KBuffer lazily populated

KBuffers are now zero-filled on demand instead of up front. This means
that you can create a huge KBuffer and it will only take up VM, not
physical pages (until you access them.)
This commit is contained in:
Andreas Kling 2019-08-06 14:12:52 +02:00
parent a0bb592b4f
commit c973a51a23
3 changed files with 5 additions and 4 deletions

View file

@ -71,7 +71,7 @@ public:
void map_for_kernel(VirtualAddress, PhysicalAddress);
RefPtr<Region> allocate_kernel_region(size_t, const StringView& name, bool user_accessible = false);
RefPtr<Region> allocate_kernel_region(size_t, const StringView& name, bool user_accessible = false, bool should_commit = true);
RefPtr<Region> allocate_user_accessible_kernel_region(size_t, const StringView& name);
void map_region_at_address(PageDirectory&, Region&, VirtualAddress);