On Oct 9, 2012, at 2:21 AM, [email protected] wrote: > From: Mike Hommey <[email protected]> > > The function declaration in system headers uses void * instead of const void > *, and > that can lead to conflicts when building against recent Android NDKs, where > string.h > includes malloc.h, which contains that conflicting definition. > --- > include/jemalloc/jemalloc.h.in | 2 +- > src/jemalloc.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in > index ad06948..f210a0b 100644 > --- a/include/jemalloc/jemalloc.h.in > +++ b/include/jemalloc/jemalloc.h.in > @@ -59,7 +59,7 @@ JEMALLOC_EXPORT void * je_memalign(size_t alignment, > size_t size) > JEMALLOC_EXPORT void * je_valloc(size_t size) JEMALLOC_ATTR(malloc); > #endif > > -JEMALLOC_EXPORT size_t je_malloc_usable_size(const void *ptr); > +JEMALLOC_EXPORT size_t je_malloc_usable_size(void *ptr); > JEMALLOC_EXPORT void je_malloc_stats_print(void (*write_cb)(void *, > const char *), void *je_cbopaque, const char *opts); > JEMALLOC_EXPORT int je_mallctl(const char *name, void *oldp, > diff --git a/src/jemalloc.c b/src/jemalloc.c > index bc54cd7..9125236 100644 > --- a/src/jemalloc.c > +++ b/src/jemalloc.c > @@ -1279,7 +1279,7 @@ JEMALLOC_EXPORT void *(* const __memalign_hook)(size_t > alignment, size_t size) = > */ > > size_t > -je_malloc_usable_size(const void *ptr) > +je_malloc_usable_size(void *ptr) > { > size_t ret; > > -- > 1.7.10.4
FreeBSD's malloc_usable_size() uses (const void *ptr) as its argument, so I'd like to get a fix in for this that doesn't require patching jemalloc for FreeBSD. Thanks, Jason _______________________________________________ jemalloc-discuss mailing list [email protected] http://www.canonware.com/mailman/listinfo/jemalloc-discuss
