diff options
author | marcel <marcel@FreeBSD.org> | 2013-05-25 18:59:11 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-05-25 18:59:11 +0000 |
commit | ff42d21b8e7e6a88887d0177722647288e50d5de (patch) | |
tree | 86648e7fa642748db2de1b9e749755c1bde26f45 /include | |
parent | baa7787a1615684fed0bcb39383aab75f401c649 (diff) | |
download | FreeBSD-src-ff42d21b8e7e6a88887d0177722647288e50d5de.zip FreeBSD-src-ff42d21b8e7e6a88887d0177722647288e50d5de.tar.gz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/malloc_np.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/malloc_np.h b/include/malloc_np.h index e130552..77efd47 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_ */ |