.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" This code is derived from software contributed to Berkeley by
.\" the American National Standards Committee X3, on Information
.\" %sccs.include.redist.man%
.\" @(#)malloc.3 6.7 (Berkeley) %G%
.Nd general memory allocation function
function allocates uninitialized space for an object whose
function maintains multiple lists of free blocks according to size, allocating
space from the appropriate list.
suitably aligned (after possible pointer
coercion) for storage of any type of object. If the space is of
or larger, the memory returned will be page-aligned.
a pointer to the allocated space if successful; otherwise
a null pointer is returned.
The current implementation of
does not always fail gracefully when system
memory limits are approached.
It may fail to allocate memory when larger free blocks could be broken
up, or when limits are exceeded because the size is rounded up.
It is optimized for sizes that are powers of two.