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 /gc.c | |
parent | 7800a4b566d06ad8028a0793e50467bc233040c7 (diff) | |
download | ruby-1a2997b299151e202ca88082161e86ec688d883b.tar.gz |
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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 */ |