Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
authorJonathan Chambers <joncham@gmail.com>
Fri, 12 Jan 2018 16:18:46 +0000 (19:18 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 12 Jan 2018 16:18:46 +0000 (19:18 +0300)
(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

index 05205e5..9f2490d 100644 (file)
 # 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