BSDMALLOC(3)

NAME
bsdmalloc - lightweight historic BSD memory allocator replacement

LIBRARY
libbsdmalloc

SYNOPSIS
#include <stdlib.h>
void *
malloc(size_t size);
void *
calloc(size_t nmemb, size_t size);
void *
realloc(void *ptr, size_t size);
void *
aligned_alloc(size_t alignment, size_t size);
int
posix_memalign(void **memptr, size_t alignment, size_t size);
void
free(void *ptr);
void
_malloc_prefork(void);
void
_malloc_postfork(void);
void
_malloc_postfork_child(void);

DESCRIPTION
The bsdmalloc library provides a lower-performance but smaller-size drop-in replacement for the standard malloc(3) family of functions provided by libc, as well as internal hooks for fork(2) safety in multithreaded programs.

Programs can be statically linked with -lbsdmalloc for smaller code footprint, at a higher cost to run-time performance and scalability and limited diagnostics.

SEE ALSO
malloc(3), posix_memalign(3)

BUGS
bsdmalloc's implementation of malloc(), calloc(), and realloc() doesn't correctly set errno(2) on failure.