diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-03 14:48:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-03 14:48:20 +0000 |
commit | b7c6db94ae2b9532640609163099c738decb31e6 (patch) | |
tree | 3ad8430052846cefef81706dc9d4edba1b0964ab /gc.c | |
parent | 7e1f3c636b317571141c9a0ca778a088f7c22ccb (diff) |
gc.c: use malloc_size
* configure.in: check malloc_size() available on BSD.
* gc.c: use malloc_size() with malloc/malloc.h on BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -39,12 +39,18 @@ # ifdef _WIN32 # define HAVE_MALLOC_USABLE_SIZE # define malloc_usable_size(a) _msize(a) +# elif defined HAVE_MALLOC_SIZE +# define HAVE_MALLOC_USABLE_SIZE +# define malloc_usable_size(a) malloc_size(a) # endif -#else +#endif +#ifdef HAVE_MALLOC_USABLE_SIZE # ifdef HAVE_MALLOC_H # include <malloc.h> # elif defined(HAVE_MALLOC_NP_H) # include <malloc_np.h> +# elif defined(HAVE_MALLOC_MALLOC_H) +# include <malloc/malloc.h> # endif #endif |