diff options
-rw-r--r-- | src/lib/utils/os_utils.cpp | 7 | ||||
-rw-r--r-- | src/lib/utils/os_utils.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp index 060de19a9..0f3c2dfdc 100644 --- a/src/lib/utils/os_utils.cpp +++ b/src/lib/utils/os_utils.cpp @@ -667,11 +667,12 @@ void OS::free_locked_pages(const std::vector<void*>& pages) void OS::page_named(void* page, size_t size) { - constexpr char name[] = "Botan"; + static constexpr char name[] = "Botan"; #if defined(BOTAN_TARGET_OS_HAS_PRCTL) - (void)prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, reinterpret_cast<uintptr_t>(page), size, name); + int r = prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, reinterpret_cast<uintptr_t>(page), size, name); + BOTAN_UNUSED(r); #else - (void)name; + BOTAN_UNUSED(page, size); #endif } diff --git a/src/lib/utils/os_utils.h b/src/lib/utils/os_utils.h index 6550eea0d..62dfdeeaf 100644 --- a/src/lib/utils/os_utils.h +++ b/src/lib/utils/os_utils.h @@ -150,7 +150,7 @@ void page_prohibit_access(void* page); void page_allow_access(void* page); /** -* Set a ID to a page's range +* Set a ID to a page's range expressed by size bytes */ void page_named(void* page, size_t size); |