|
|
@ -33,7 +33,7 @@ |
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
|
.\" SUCH DAMAGE. |
|
|
|
.\" |
|
|
|
.\" $OpenBSD: malloc.3,v 1.2 1996/08/10 04:18:49 tholo Exp $ |
|
|
|
.\" $OpenBSD: malloc.3,v 1.3 1996/08/21 03:12:18 downsj Exp $ |
|
|
|
.\" |
|
|
|
.Dd June 4, 1993 |
|
|
|
.Dt MALLOC 3 |
|
|
@ -42,7 +42,8 @@ |
|
|
|
.Nm malloc , |
|
|
|
.Nd general memory allocation function |
|
|
|
.Pp |
|
|
|
.Nm free |
|
|
|
.Nm free , |
|
|
|
.Nm cfree |
|
|
|
.Nd free up memory allocated with malloc, calloc or realloc |
|
|
|
.Pp |
|
|
|
.Nm realloc |
|
|
@ -53,6 +54,8 @@ |
|
|
|
.Fn malloc "size_t size" |
|
|
|
.Ft void |
|
|
|
.Fn free "void *ptr" |
|
|
|
.Ft void |
|
|
|
.Fn cfree "void *ptr" |
|
|
|
.Ft void * |
|
|
|
.Fn realloc "void *ptr" "size_t size" |
|
|
|
.Sh DESCRIPTION |
|
|
@ -83,6 +86,13 @@ If |
|
|
|
.Fa ptr |
|
|
|
is a null pointer, no action occurs. |
|
|
|
.Pp |
|
|
|
A |
|
|
|
.Fn cfree |
|
|
|
function is also provided for compatibility with old systems and other |
|
|
|
.Nm malloc |
|
|
|
libraries; it is simply an alias for |
|
|
|
.Fn free . |
|
|
|
.Pp |
|
|
|
The |
|
|
|
.Fn realloc |
|
|
|
function changes the size of the object pointed to by |
|
|
|