summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-05 05:36:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-05 05:36:28 +0000
commita4d7e42888b0c7f39d7a0aa94c80c4c44d48c32e (patch)
tree7a528353e5d94871a7f49073f87bb325cb6794b3
parent6ab08d2e8dd0c382d41e477f8255d7d6e4e67d9b (diff)
version.c: show malloc_conf
* configure.in (jemalloc): check for the header regardless drop-in libjemalloc is found, for `malloc_conf` declaration. * version.c (ruby_show_version): show `malloc_conf` if set. [Feature #9113] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--configure.in10
-rw-r--r--version.c3
3 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f46c2efa42..4ef1d716059 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-Thu Jun 5 14:16:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 5 14:36:24 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (jemalloc): check for the header regardless drop-in
+ libjemalloc is found, for `malloc_conf` declaration.
+
+ * version.c (ruby_show_version): show `malloc_conf` if set.
+ [Feature #9113]
* configure.in (with-jemalloc): also check for header, for ABIs
which JEMALLOC_MANGLE is needed, i.e., Mach-O and PE-COFF
diff --git a/configure.in b/configure.in
index 555c3233218..cfd90655146 100644
--- a/configure.in
+++ b/configure.in
@@ -1178,12 +1178,10 @@ AC_ARG_WITH([jemalloc],
[with_jemalloc=yes], [with_jemalloc=no])
AS_IF([test "x$with_jemalloc" = xyes],[
AC_CHECK_LIB([jemalloc],[malloc_conf],[], [with_jemalloc=no])
- AS_IF([test "x$with_jemalloc" != xyes],[
- AC_CHECK_HEADER(jemalloc/jemalloc.h, [
- AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
- AC_DEFINE(JEMALLOC_MANGLE)
- with_jemalloc=yes
- ])
+ AC_CHECK_HEADER(jemalloc/jemalloc.h, [
+ AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
+ AC_DEFINE(JEMALLOC_MANGLE)
+ with_jemalloc=yes
])
AS_IF([test "x$with_jemalloc" = xyes],
[
diff --git a/version.c b/version.c
index 573cf619bd2..b2a4d2d25ed 100644
--- a/version.c
+++ b/version.c
@@ -78,6 +78,9 @@ void
ruby_show_version(void)
{
PRINT(description);
+#ifdef HAVE_MALLOC_CONF
+ if (malloc_conf) printf("malloc_conf=%s\n", malloc_conf);
+#endif
fflush(stdout);
}