mapmalloc - memory allocator
cc [ flag ... ] file ... –lmapmalloc [ library ... ] #include <stdlib.h> void *malloc(size_t size);
void *calloc(size_t nelem, size_t elsize);
void *realloc(void *ptr, size_t size);
size_t malloc_usable_size(void *ptr);
void free(void *ptr);
The collection of malloc functions in this library use mmap(2) instead of sbrk(2) for acquiring new heap space. The functions in this library are intended to be used only if necessary, when applications must call sbrk(), but need to call other library routines that might call malloc. The algorithms used by these functions are not sophisticated. There is no reclaiming of memory.
They operate as described on the malloc(3C) manual page, except for the following differences:
Support for using adi(7) is not available.
Entry points for memalign() and valloc() are empty routines that return failure, and are provided only to protect the user from mixing malloc() functions from different implementations. This will also cause calls to aligned_alloc(3C) and posix_memalign(3C) to fail.
See attributes(7) for descriptions of the following attributes:
See malloc(3C) for an overview and comparison of all the allocation libraries provided by Oracle Solaris.