From 5270983dc4f7bacda655a2ebcb48162cbbb67477 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 3 Feb 2026 19:44:54 -0800 Subject: [PATCH] FEXCore/Allocator: Disable additional VMA name attempts on failure Reduces spam log in strace on platforms that don't support it. --- FEXCore/Source/Utils/Allocator.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FEXCore/Source/Utils/Allocator.cpp b/FEXCore/Source/Utils/Allocator.cpp index 8dc010aaf..e74b9cce3 100644 --- a/FEXCore/Source/Utils/Allocator.cpp +++ b/FEXCore/Source/Utils/Allocator.cpp @@ -59,7 +59,14 @@ void* FEX_mmap(void* addr, size_t length, int prot, int flags, int fd, off_t off } void VirtualName(const char* Name, void* Ptr, size_t Size) { - prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, Ptr, Size, Name); + static bool Supports {true}; + if (Supports) { + auto Result = prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, Ptr, Size, Name); + if (Result == -1) { + // Disable any additional attempts. + Supports = false; + } + } } int FEX_munmap(void* addr, size_t length) {