xref: /csrg-svn/lib/libc/stdlib/calloc.3 (revision 61180)
1*61180Sbostic.\" Copyright (c) 1991, 1993
2*61180Sbostic.\"	The Regents of the University of California.  All rights reserved.
348914Scael.\"
450286Sbostic.\" This code is derived from software contributed to Berkeley by
550286Sbostic.\" the American National Standards Committee X3, on Information
650286Sbostic.\" Processing Systems.
750286Sbostic.\"
848914Scael.\" %sccs.include.redist.man%
948914Scael.\"
10*61180Sbostic.\"	@(#)calloc.3	8.1 (Berkeley) 06/04/93
1148914Scael.\"
1248914Scael.Dd
1348914Scael.Dt CALLOC 3
1448914Scael.Os
1548914Scael.Sh NAME
1648914Scael.Nm calloc
1748914Scael.Nd allocate clean memory (zero initialized space)
1848914Scael.Sh SYNOPSIS
1948914Scael.Fd #include <stdlib.h>
2048914Scael.Ft void *
2148914Scael.Fn calloc "size_t nmemb" "size_t size"
2248914Scael.Sh DESCRIPTION
2348914ScaelThe
2448914Scael.Fn calloc
2548914Scaelfunction allocates space for an array of
2648914Scael.Fa nmemb
2748914Scaelobjects, each of whose size is
2848914Scael.Fa size .
2948914ScaelThe space is initialized to all bits zero.
3048914Scael.Sh RETURN VALUES
3148914ScaelThe
3248914Scael.Fn calloc
3348914Scaelfunction returns
3448914Scaela pointer to the
3548914Scaelthe allocated space if successful; otherwise a null pointer is returned.
3648914Scael.Sh SEE ALSO
3748914Scael.Xr malloc 3 ,
3848914Scael.Xr realloc 3 ,
3948914Scael.Xr free 3 ,
4048914Scael.Sh STANDARDS
4148914ScaelThe
4248914Scael.Fn calloc
4348914Scaelfunction conforms to
4448914Scael.St -ansiC .
45