jemalloc

Memory allocator library optimizing for fragmentation avoidance

brewmacoslinux
Try with needOr install directly
Source

About

Implementation of malloc emphasizing fragmentation avoidance

Commands

jemalloc

Examples

Preload jemalloc for a specific application to use it as the default allocator$ LD_PRELOAD=$(brew --prefix jemalloc)/lib/libjemalloc.dylib ./myapp
Compile a C program with jemalloc instead of the default allocator$ gcc -o myprogram myprogram.c -L$(brew --prefix jemalloc)/lib -ljemalloc
Enable jemalloc statistics and profiling for memory analysis$ MALLOC_CONF=stats_print:true LD_PRELOAD=$(brew --prefix jemalloc)/lib/libjemalloc.dylib ./myapp