diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-14 01:25:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-14 01:34:23 +0100 |
commit | 8415866c0371eae16e3c1221720efaa6c3cec3e2 (patch) | |
tree | 069ac36c07e125f946a1369eb34746e427ba3eb0 /Kernel/Heap | |
parent | 1593219a41bdb9d8efa62abf5fca462b38563878 (diff) | |
download | serenity-8415866c0371eae16e3c1221720efaa6c3cec3e2.zip |
Kernel: Remove user/kernel flags from Region
Now that we no longer need to support the signal trampolines being
user-accessible inside the kernel memory range, we can get rid of the
"kernel" and "user-accessible" flags on Region and simply use the
address of the region to determine whether it's kernel or user.
This also tightens the page table mapping code, since it can now set
user-accessibility based solely on the virtual address of a page.
Diffstat (limited to 'Kernel/Heap')
-rw-r--r-- | Kernel/Heap/kmalloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 8d5fc06cd8..0e81d4836f 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -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, false, AllocationStrategy::AllocateNow); + region = MM.allocate_kernel_region(memory_size, "kmalloc subheap", Region::Access::Read | Region::Access::Write, 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, false, AllocationStrategy::AllocateNow); + m_backup_memory = MM.allocate_kernel_region(1 * MiB, "kmalloc subheap", Region::Access::Read | Region::Access::Write, AllocationStrategy::AllocateNow); } size_t backup_memory_bytes() const |