From 4a4c41a852ec35d971f17f8241c9f56033da1b97 Mon Sep 17 00:00:00 2001 From: Jonathan Chambers Date: Fri, 12 Jan 2018 19:18:46 +0300 Subject: [PATCH] Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3 (part of commit 9379c66 from Unity-Technologies/bdwgc) Issue #173 (bdwgc). * include/private/gcconfig.h [USE_MUNMAP && !MUNMAP_THRESHOLD && SN_TARGET_PS3] (MUNMAP_THRESHOLD): Define to 2; add comment. --- include/private/gcconfig.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 05205e5e..9f2490de 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2827,6 +2827,15 @@ # define MMAP_SUPPORTED #endif +/* Sony PS/3 may not need to be this aggressive, but the default is */ +/* likely too lax under heavy allocation pressure. The platform does */ +/* not have a virtual paging system, so it does not have a large */ +/* virtual address space that a standard x64 platform has. */ +#if defined(USE_MUNMAP) && !defined(MUNMAP_THRESHOLD) \ + && defined(SN_TARGET_PS3) +# define MUNMAP_THRESHOLD 2 +#endif + #if defined(GC_DISABLE_INCREMENTAL) || defined(MANUAL_VDB) # undef GWW_VDB # undef MPROTECT_VDB -- 2.40.0