[PATCH] Export je_memalign and je_valloc

Mike Hommey mh+jemalloc at glandium.org
Mon May 7 07:08:34 PDT 2012

From: Mike Hommey <mh at glandium.org>

da99e31 removed attributes on je_memalign and je_valloc, while they didn't
have a definition in the jemalloc.h header, thus making them non-exported.
Export them again, by defining them in the jemalloc.h header.
 include/jemalloc/jemalloc.h.in |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in
index 47a4b9b..ad06948 100644
--- a/include/jemalloc/jemalloc.h.in
+++ b/include/jemalloc/jemalloc.h.in
@@ -50,6 +50,15 @@ JEMALLOC_EXPORT void	*je_aligned_alloc(size_t alignment, size_t size)
 JEMALLOC_EXPORT void	*je_realloc(void *ptr, size_t size);
 JEMALLOC_EXPORT void	je_free(void *ptr);
+JEMALLOC_EXPORT void *	je_memalign(size_t alignment, size_t size)
+    JEMALLOC_ATTR(malloc);
+JEMALLOC_EXPORT void *	je_valloc(size_t size) JEMALLOC_ATTR(malloc);
 JEMALLOC_EXPORT size_t	je_malloc_usable_size(const void *ptr);
 JEMALLOC_EXPORT void	je_malloc_stats_print(void (*write_cb)(void *,
     const char *), void *je_cbopaque, const char *opts);

More information about the jemalloc-discuss mailing list