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

ruby-changes:31683

From: nobu <ko1@a...>
Date: Thu, 21 Nov 2013 18:52:14 +0900 (JST)
Subject: [ruby-changes:31683] nobu:r43762 (trunk): gc.c: malloc_usable_size

nobu	2013-11-21 18:52:09 +0900 (Thu, 21 Nov 2013)

  New Revision: 43762

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

  Log:
    gc.c: malloc_usable_size
    
    * gc.c (malloc_usable_size): use _msize() on Windows.

  Modified files:
    trunk/configure.in
    trunk/gc.c
Index: configure.in
===================================================================
--- configure.in	(revision 43761)
+++ configure.in	(revision 43762)
@@ -1009,6 +1009,7 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.in#L1009
 		ac_cv_type_struct_timeval=yes
                 ac_cv_func_clock_gettime=yes
                 ac_cv_func_clock_getres=yes
+		ac_cv_func_malloc_usable_size=no
 		AC_CHECK_TYPE([NET_LUID], [], [],
 			      [@%:@include <windows.h>
 		  	      @%:@include <iphlpapi.h>])
Index: gc.c
===================================================================
--- gc.c	(revision 43761)
+++ gc.c	(revision 43762)
@@ -35,6 +35,12 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L35
 # define __has_feature(x) 0
 #endif
 
+#ifndef HAVE_MALLOC_USABLE_SIZE
+# ifdef _WIN32
+#   define malloc_usable_size(a) _msize(a)
+# endif
+#endif
+
 #if /* is ASAN enabled? */ \
     __has_feature(address_sanitizer) /* Clang */ || \
     defined(__SANITIZE_ADDRESS__)  /* GCC 4.8.x */

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

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