diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-21 03:12:19 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-21 03:12:19 +0000 |
commit | af5fb245479c21b57138d2cd39804116813e0cba (patch) | |
tree | 9df57afe2fa99c7b7d708e92fa48565ef11df8b7 /lib | |
parent | a5fa21f5ce8c4c39e65a9c70705174a527528e33 (diff) |
Document it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/stdlib/malloc.3 | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 6c635ef354b..abd46ae12a5 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.3 1996/08/10 04:18:48 tholo Exp $ +# $OpenBSD: Makefile.inc,v 1.4 1996/08/21 03:12:17 downsj Exp $ # stdlib sources .PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/stdlib ${.CURDIR}/stdlib @@ -37,7 +37,7 @@ MAN+= abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \ random.3 realpath.3 strtod.3 strtol.3 strtoul.3 system.3 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 -MLINKS+=malloc.3 free.3 malloc.3 realloc.3 +MLINKS+=malloc.3 free.3 malloc.3 realloc.3 cfree.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 MLINKS+=rand.3 srand.3 MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index b6acd648549..979e77016df 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -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 |