diff options
author | Jason Evans <je@fb.com> | 2012-02-11 04:22:09 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-02-11 04:22:09 (GMT) |
commit | 7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf (patch) | |
tree | 9b0f1156e6aa61f50a01c90b72fdaefeabe414a8 /configure.ac | |
parent | b3bd885090230cc28add77c399b4ed440b760ca3 (diff) | |
download | jemalloc-7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf.zip jemalloc-7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf.tar.gz jemalloc-7372b15a31c63ac5cb9ed8aeabc2a0a3c005e8bf.tar.bz2 |
Reduce cpp conditional logic complexity.
Convert configuration-related cpp conditional logic to use static
constant variables, e.g.:
#ifdef JEMALLOC_DEBUG
[...]
#endif
becomes:
if (config_debug) {
[...]
}
The advantage is clearer, more concise code. The main disadvantage is
that data structures no longer have conditionally defined fields, so
they pay the cost of all fields regardless of whether they are used. In
practice, this is only a minor concern; config_stats will go away in an
upcoming change, and config_prof is the only other major feature that
depends on more than a few special-purpose fields.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 699f931..9617a5e 100644 --- a/configure.ac +++ b/configure.ac @@ -174,6 +174,9 @@ AC_DEFINE_UNQUOTED([CPU_SPINWAIT], [$CPU_SPINWAIT]) LD_PRELOAD_VAR="LD_PRELOAD" so="so" +dnl Heap profiling uses the log(3) function. +LIBS="$LIBS -lm" + dnl Platform-specific settings. abi and RPATH can probably be determined dnl programmatically, but doing so is error-prone, which makes it generally dnl not worth the trouble. @@ -553,7 +556,6 @@ fi AC_MSG_CHECKING([configured backtracing method]) AC_MSG_RESULT([$backtrace_method]) if test "x$enable_prof" = "x1" ; then - LIBS="$LIBS -lm" AC_DEFINE([JEMALLOC_PROF], [ ]) fi AC_SUBST([enable_prof]) |