Merge branch 'pw/use-glibc-tunable-for-malloc-optim'
Avoid repeatedly running getconf to ask libc version in the test suite, and instead just as it once per script. * pw/use-glibc-tunable-for-malloc-optim: tests: cache glibc version check
This commit is contained in:
commit
7d0a1c8895
@ -575,14 +575,19 @@ then
|
|||||||
: nothing
|
: nothing
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
_USE_GLIBC_TUNABLES=
|
||||||
|
if _GLIBC_VERSION=$(getconf GNU_LIBC_VERSION 2>/dev/null) &&
|
||||||
|
_GLIBC_VERSION=${_GLIBC_VERSION#"glibc "} &&
|
||||||
|
expr 2.34 \<= "$_GLIBC_VERSION" >/dev/null
|
||||||
|
then
|
||||||
|
_USE_GLIBC_TUNABLES=YesPlease
|
||||||
|
fi
|
||||||
setup_malloc_check () {
|
setup_malloc_check () {
|
||||||
local g
|
local g
|
||||||
local t
|
local t
|
||||||
MALLOC_CHECK_=3 MALLOC_PERTURB_=165
|
MALLOC_CHECK_=3 MALLOC_PERTURB_=165
|
||||||
export MALLOC_CHECK_ MALLOC_PERTURB_
|
export MALLOC_CHECK_ MALLOC_PERTURB_
|
||||||
if _GLIBC_VERSION=$(getconf GNU_LIBC_VERSION 2>/dev/null) &&
|
if test -n "$_USE_GLIBC_TUNABLES"
|
||||||
_GLIBC_VERSION=${_GLIBC_VERSION#"glibc "} &&
|
|
||||||
expr 2.34 \<= "$_GLIBC_VERSION" >/dev/null
|
|
||||||
then
|
then
|
||||||
g=
|
g=
|
||||||
LD_PRELOAD="libc_malloc_debug.so.0"
|
LD_PRELOAD="libc_malloc_debug.so.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user