From 2cd8b21974993052fdcb0bddfa62423dbeb6002a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 6 Aug 2021 22:25:00 +0200 Subject: Kernel: Add convenience values to the Memory::Region::Access enum Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite` you can now say `Memory::Region::Access::ReadWrite`. --- Kernel/Heap/kmalloc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/Heap') diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 55ee04f7d1..2e58e563cc 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -99,7 +99,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", Memory::Region::Access::Read | Memory::Region::Access::Write, AllocationStrategy::AllocateNow); + region = MM.allocate_kernel_region(memory_size, "kmalloc subheap", Memory::Region::Access::ReadWrite, AllocationStrategy::AllocateNow); if (region) { dbgln("kmalloc: Adding even more memory to heap at {}, bytes: {}", region->vaddr(), region->size()); @@ -173,7 +173,7 @@ struct KmallocGlobalHeap { { if (m_backup_memory) return; - m_backup_memory = MM.allocate_kernel_region(1 * MiB, "kmalloc subheap", Memory::Region::Access::Read | Memory::Region::Access::Write, AllocationStrategy::AllocateNow); + m_backup_memory = MM.allocate_kernel_region(1 * MiB, "kmalloc subheap", Memory::Region::Access::ReadWrite, AllocationStrategy::AllocateNow); } size_t backup_memory_bytes() const -- cgit v1.2.3