Feature #14759 ยป 0001-gc.c-Init_GC-set-M_ARENA_MAX-2-for-glibc-malloc.patch
configure.ac | ||
---|---|---|
AC_CHECK_FUNCS(lutimes)
|
||
AC_CHECK_FUNCS(malloc_usable_size)
|
||
AC_CHECK_FUNCS(malloc_size)
|
||
AC_CHECK_FUNCS(mallopt)
|
||
AC_CHECK_FUNCS(mblen)
|
||
AC_CHECK_FUNCS(memalign)
|
||
AC_CHECK_FUNCS(memset_s)
|
gc.c | ||
---|---|---|
#undef OPT
|
||
OBJ_FREEZE(opts);
|
||
}
|
||
#if defined(HAVE_MALLOPT) && defined(M_ARENA_MAX)
|
||
/*
|
||
* Ruby doesn't benefit from many glibc malloc arenas due to GVL,
|
||
* remove or increase when we get Guilds
|
||
*/
|
||
if (!getenv("MALLOC_ARENA_MAX")) {
|
||
mallopt(M_ARENA_MAX, 2);
|
||
}
|
||
#endif
|
||
}
|
||
-
|