Updated: 2022/Sep/29
Please read Privacy Policy. It's for your privacy.
BSDMALLOC(3) Library Functions Manual BSDMALLOC(3)
NAME
bsdmalloc - lightweight historic BSD memory allocator replacement
LIBRARY
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
Standard C Library (libc, -lc), 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.
NetBSD 10.99 July 4, 2023 NetBSD 10.99