musl/src/malloc
Rich Felker 8d998a7b3b add malloc_usable_size function and non-stub malloc.h
this function is needed for some important practical applications of
ABI compatibility, and may be useful for supporting some non-portable
software at the source level too.

I was hesitant to add a function which imposes any constraints on
malloc internals; however, it turns out that any malloc implementation
which has realloc must already have an efficient way to determine the
size of existing allocations, so no additional constraint is imposed.

for now, some internal malloc definitions are duplicated in the new
source file. if/when malloc is refactored to put them in a shared
internal header file, these could be removed.

since malloc_usable_size is conventionally declared in malloc.h, the
empty stub version of this file was no longer suitable. it's updated
to provide the standard allocator functions, nonstandard ones (even if
stdlib.h would not expose them based on the feature test macros in
effect), and any malloc-extension functions provided (currently, only
malloc_usable_size).
2014-08-25 22:47:27 -04:00
..
__brk.c slightly optimize __brk for size 2013-10-05 12:00:55 -04:00
aligned_alloc.c move core memalign code from aligned_alloc to __memalign 2013-07-04 23:58:16 -04:00
calloc.c include cleanups: remove unused headers and add feature test macros 2013-12-12 05:09:18 +00:00
DESIGN initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
lite_malloc.c ditch the priority inheritance locks; use malloc's version of lock 2012-04-24 16:32:23 -04:00
malloc.c avoid malloc failure for small requests when brk can't be extended 2014-04-02 17:57:15 -04:00
malloc_usable_size.c add malloc_usable_size function and non-stub malloc.h 2014-08-25 22:47:27 -04:00
memalign.c remove redundant check in memalign 2013-07-23 23:40:26 -04:00
posix_memalign.c move core memalign code from aligned_alloc to __memalign 2013-07-04 23:58:16 -04:00