mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 20:29:03 +00:00
Kernel: Merge PurgeableVMObject into AnonymousVMObject
This implements memory commitments and lazy-allocation of committed memory.
This commit is contained in:
parent
b2a52f6208
commit
476f17b3f1
Notes:
sideshowbarker
2024-07-19 00:14:30 +09:00
Author: https://github.com/tomuta
Commit: 476f17b3f1
Pull-request: https://github.com/SerenityOS/serenity/pull/4707
35 changed files with 937 additions and 564 deletions
|
@ -112,7 +112,7 @@ struct KmallocGlobalHeap {
|
|||
// allocations not including the original allocation_request
|
||||
// that triggered heap expansion. If we don't allocate
|
||||
memory_size += 1 * MiB;
|
||||
region = MM.allocate_kernel_region(memory_size, "kmalloc subheap", Region::Access::Read | Region::Access::Write);
|
||||
region = MM.allocate_kernel_region(memory_size, "kmalloc subheap", Region::Access::Read | Region::Access::Write, false, AllocationStrategy::AllocateNow);
|
||||
if (region) {
|
||||
klog() << "kmalloc(): Adding even more memory to heap at " << region->vaddr() << ", bytes: " << region->size();
|
||||
|
||||
|
@ -176,7 +176,7 @@ struct KmallocGlobalHeap {
|
|||
{
|
||||
if (m_backup_memory)
|
||||
return;
|
||||
m_backup_memory = MM.allocate_kernel_region(1 * MiB, "kmalloc subheap", Region::Access::Read | Region::Access::Write);
|
||||
m_backup_memory = MM.allocate_kernel_region(1 * MiB, "kmalloc subheap", Region::Access::Read | Region::Access::Write, false, AllocationStrategy::AllocateNow);
|
||||
}
|
||||
|
||||
size_t backup_memory_bytes() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue