Project

General

Profile

Feature #14759 ยป 0001-gc.c-Init_GC-set-M_ARENA_MAX-2-for-glibc-malloc.patch

normalperson (Eric Wong), 05/15/2018 08:25 AM

View differences:

configure.ac
1788 1788
AC_CHECK_FUNCS(lutimes)
1789 1789
AC_CHECK_FUNCS(malloc_usable_size)
1790 1790
AC_CHECK_FUNCS(malloc_size)
1791
AC_CHECK_FUNCS(mallopt)
1791 1792
AC_CHECK_FUNCS(mblen)
1792 1793
AC_CHECK_FUNCS(memalign)
1793 1794
AC_CHECK_FUNCS(memset_s)
gc.c
9755 9755
#undef OPT
9756 9756
	OBJ_FREEZE(opts);
9757 9757
    }
9758

  
9759
#if defined(HAVE_MALLOPT) && defined(M_ARENA_MAX)
9760
    /*
9761
     * Ruby doesn't benefit from many glibc malloc arenas due to GVL,
9762
     * remove or increase when we get Guilds
9763
     */
9764
    if (!getenv("MALLOC_ARENA_MAX")) {
9765
        mallopt(M_ARENA_MAX, 2);
9766
    }
9767
#endif
9758 9768
}
9759
-