<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> {The S-lang C Library Reference}: SLcalloc</TITLE>
<LINK HREF="cref-96.html" REL=next>
<LINK HREF="cref-94.html" REL=previous>
<LINK HREF="cref.html#toc95" REL=contents>
</HEAD>
<BODY>
<A HREF="cref-96.html">Next</A>
<A HREF="cref-94.html">Previous</A>
<A HREF="cref.html#toc95">Contents</A>
<HR>
<H2><A NAME="SLcalloc"></A> <A NAME="s95">95. <B>SLcalloc</B></A></H2>

<P>
<DL>
<DT><B> Synopsis </B><DD><P>Allocate some memory
<DT><B> Usage </B><DD><P><CODE>char *SLcalloc (unsigned int num_elem, unsigned int elem_size)</CODE>
<DT><B> Description </B><DD><P>This function uses <CODE>calloc</CODE> to allocate memory for
<CODE>num_elem</CODE> objects with each of size <CODE>elem_size</CODE> and returns
the result.  In addition, the newly allocated memory is zeroed. 
Upon error it returns <CODE>NULL</CODE>; otherwise it returns a pointer to
the allocated memory.  One should use <CODE>SLfree</CODE> to free the
memory after used.
<DT><B> See Also </B><DD><P><CODE>SLmalloc, SLrealloc, SLfree</CODE>
</DL>
<P>
<P>
<P>
<HR>
<A HREF="cref-96.html">Next</A>
<A HREF="cref-94.html">Previous</A>
<A HREF="cref.html#toc95">Contents</A>
</BODY>
</HTML>
