diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 09:52:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 09:52:09 +0000 |
commit | 1a2997b299151e202ca88082161e86ec688d883b (patch) | |
tree | fac7bf60a90ab407dafb15b1c0703d3f70cd208e | |
parent | 7800a4b566d06ad8028a0793e50467bc233040c7 (diff) |
gc.c: malloc_usable_size
* gc.c (malloc_usable_size): use _msize() on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | gc.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in index ab0cea9905..923843fe6f 100644 --- a/configure.in +++ b/configure.in @@ -1009,6 +1009,7 @@ main() 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>]) @@ -35,6 +35,12 @@ # 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 */ |