issue-489: added tcmalloc test pass with chromium-style decommit
This commit is contained in:
parent
6a000d6dd5
commit
bd9665ebbe
|
@ -44,11 +44,7 @@ TMPDIR=/tmp/tcmalloc_unittest
|
||||||
rm -rf $TMPDIR || exit 2
|
rm -rf $TMPDIR || exit 2
|
||||||
mkdir $TMPDIR || exit 3
|
mkdir $TMPDIR || exit 3
|
||||||
|
|
||||||
# $1: value of tcmalloc_unittest env. var.
|
run_unittest() {
|
||||||
run_check_transfer_num_obj() {
|
|
||||||
[ -n "$1" ] && export TCMALLOC_TRANSFER_NUM_OBJ="$1"
|
|
||||||
|
|
||||||
echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_TRANSFER_NUM_OBJ=$1 ... "
|
|
||||||
if $TCMALLOC_UNITTEST > $TMPDIR/output 2>&1; then
|
if $TCMALLOC_UNITTEST > $TMPDIR/output 2>&1; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
|
@ -61,8 +57,20 @@ run_check_transfer_num_obj() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1: value of tcmalloc_unittest env. var.
|
||||||
|
run_check_transfer_num_obj() {
|
||||||
|
[ -n "$1" ] && export TCMALLOC_TRANSFER_NUM_OBJ="$1"
|
||||||
|
|
||||||
|
echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_TRANSFER_NUM_OBJ=$1 ... "
|
||||||
|
run_unittest
|
||||||
|
}
|
||||||
|
|
||||||
run_check_transfer_num_obj ""
|
run_check_transfer_num_obj ""
|
||||||
run_check_transfer_num_obj "40"
|
run_check_transfer_num_obj "40"
|
||||||
run_check_transfer_num_obj "4096"
|
run_check_transfer_num_obj "4096"
|
||||||
|
|
||||||
|
echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_AGGRESSIVE_DECOMMIT=t ... "
|
||||||
|
|
||||||
|
TCMALLOC_AGGRESSIVE_DECOMMIT=t run_unittest
|
||||||
|
|
||||||
echo "PASS"
|
echo "PASS"
|
||||||
|
|
Loading…
Reference in New Issue