[前][次][番号順一覧][スレッド一覧]

ruby-changes:34274

From: nobu <ko1@a...>
Date: Thu, 5 Jun 2014 14:36:34 +0900 (JST)
Subject: [ruby-changes:34274] nobu:r46355 (trunk): version.c: show malloc_conf

nobu	2014-06-05 14:36:28 +0900 (Thu, 05 Jun 2014)

  New Revision: 46355

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46355

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/version.c
Index: configure.in
===================================================================
--- configure.in	(revision 46354)
+++ configure.in	(revision 46355)
@@ -1178,12 +1178,10 @@ AC_ARG_WITH([jemalloc], https://github.com/ruby/ruby/blob/trunk/configure.in#L1178
   [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],
     [
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46354)
+++ ChangeLog	(revision 46355)
@@ -1,4 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Thu Jun  5 14:16:41 2014  Nobuyoshi Nakada  <nobu@r...>
+Thu Jun  5 14:36:24 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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
Index: version.c
===================================================================
--- version.c	(revision 46354)
+++ version.c	(revision 46355)
@@ -78,6 +78,9 @@ void https://github.com/ruby/ruby/blob/trunk/version.c#L78
 ruby_show_version(void)
 {
     PRINT(description);
+#ifdef HAVE_MALLOC_CONF
+    if (malloc_conf) printf("malloc_conf=%s\n", malloc_conf);
+#endif
     fflush(stdout);
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]