From 9dfba391d62cbfc09557284ffa78b28541014b27 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 25 May 2013 18:59:11 +0000 Subject: Make the malloc(3) family of functions weak and make their non-weak implementations visible for use by applications. The functions $F that are now weak symbols are: allocm, calloc, dallocm, free, malloc, malloc_usable_size, nallocm, posix_memalign, rallocm, realloc, sallocm The non-weak implementations of $F are exported as __$F. Submitted by: stevek@juniper.net Reviewed by: jasone@, kib@ Approved by: jasone@ (jemalloc) Obtained from: juniper Networks, Inc --- include/malloc_np.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/malloc_np.h') diff --git a/include/malloc_np.h b/include/malloc_np.h index e1305523079d7..77efd47b818be 100644 --- a/include/malloc_np.h +++ b/include/malloc_np.h @@ -61,6 +61,18 @@ int rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, int sallocm(const void *ptr, size_t *rsize, int flags) __nonnull(1); int dallocm(void *ptr, int flags) __nonnull(1); int nallocm(size_t *rsize, size_t size, int flags); + +void * __calloc(size_t, size_t) __malloc_like; +void * __malloc(size_t) __malloc_like; +void * __realloc(void *, size_t); +void __free(void *); +int __posix_memalign(void **, size_t, size_t); +size_t __malloc_usable_size(const void *); +int __allocm(void **, size_t *, size_t, int) __nonnull(1); +int __rallocm(void **, size_t *, size_t, size_t, int) __nonnull(1); +int __sallocm(const void *, size_t *, int) __nonnull(1); +int __dallocm(void *, int) __nonnull(1); +int __nallocm(size_t *, size_t, int); __END_DECLS #endif /* _MALLOC_NP_H_ */ -- cgit v1.3