Add --with-lg-tiny-min, generalize --with-lg-quantum.

This commit is contained in:
Jason Evans
2014-10-10 22:34:25 -07:00
parent 2eb941a3d3
commit 81e547566e
6 changed files with 105 additions and 16 deletions

View File

@@ -181,7 +181,6 @@ typedef unsigned index_t;
(((unsigned)(flags >> 8)) - 1)
/* Smallest size class to support. */
#define LG_TINY_MIN 3
#define TINY_MIN (1U << LG_TINY_MIN)
/*

View File

@@ -144,6 +144,9 @@
/* Support lazy locking (avoid locking unless a second thread is launched). */
#undef JEMALLOC_LAZY_LOCK
/* Minimum size class to support is 2^LG_TINY_MIN bytes. */
#undef LG_TINY_MIN
/*
* Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size
* classes).

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# Usage: size_classes.sh <lg_parr> <lg_g>
# Usage: size_classes.sh <lg_qarr> <lg_tmin> <lg_parr> <lg_g>
# The following limits are chosen such that they cover all supported platforms.
@@ -8,19 +8,19 @@
lg_zarr="2 3"
# Quanta.
lg_qarr="3 4"
lg_qarr=$1
# The range of tiny size classes is [2^lg_tmin..2^(lg_q-1)].
lg_tmin=3
lg_tmin=$2
# Maximum lookup size.
lg_kmax=12
# Page sizes.
lg_parr=`echo $1 | tr ',' ' '`
lg_parr=`echo $3 | tr ',' ' '`
# Size class group size (number of size classes for each size doubling).
lg_g=$2
lg_g=$4
pow2() {
e=$1