diff --git a/kernel/src/memory/MemoryManager.cpp b/kernel/src/memory/MemoryManager.cpp index 4c165120..aaddf064 100644 --- a/kernel/src/memory/MemoryManager.cpp +++ b/kernel/src/memory/MemoryManager.cpp @@ -433,7 +433,7 @@ namespace MemoryManager return String::from_cstring(result.data()); } - bool validate_access(void* mem, usize size, int flags) + bool validate_access(const void* mem, usize size, int flags) { uintptr_t address = (uintptr_t)mem; uintptr_t page = align_down(address); diff --git a/kernel/src/memory/MemoryManager.h b/kernel/src/memory/MemoryManager.h index 15a0a1fc..443d5095 100644 --- a/kernel/src/memory/MemoryManager.h +++ b/kernel/src/memory/MemoryManager.h @@ -29,12 +29,12 @@ namespace MemoryManager bool validate_access(const void* mem, usize size, int flags); - bool validate_user_write(void* user, usize size) + inline bool validate_user_write(void* user, usize size) { return validate_access(user, size, MMU::ReadWrite | MMU::User); } - bool validate_user_read(const void* user, usize size) + inline bool validate_user_read(const void* user, usize size) { return validate_access(user, size, MMU::User); }