Test for availability of malloc hooks via autoconf

__*_hook() is glibc, but on at least one glibc platform (homebrew),
the __GLIBC__ define isn't set correctly and we miss being able to
use these hooks.

Do a feature test for it during configuration so that we enable it
anywhere the hooks are actually available.
This commit is contained in:
Sara Golemon
2014-08-18 13:06:39 -07:00
committed by Jason Evans
parent 602c8e0971
commit 3e24afa28e
3 changed files with 40 additions and 1 deletions

View File

@@ -209,4 +209,10 @@
/* sizeof(intmax_t) == 2^LG_SIZEOF_INTMAX_T. */
#undef LG_SIZEOF_INTMAX_T
/* glibc malloc hooks (__malloc_hook, __realloc_hook, __free_hook) */
#undef JEMALLOC_GLIBC_MALLOC_HOOK
/* glibc memalign hook */
#undef JEMALLOC_GLIBC_MEMALIGN_HOOK
#endif /* JEMALLOC_INTERNAL_DEFS_H_ */