calloc.html 862 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <html>
  2. <head>
  3. <title>calloc</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>calloc</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. calloc - allocate and clear memory
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;stdlib.h&gt;<br>
  13. <br>
  14. void *<br>
  15. calloc(size_t <em>number</em>, size_t <em>size</em>);
  16. <h3>Description</h3>
  17. calloc allocates <em>number</em>*<em>size</em> bytes of memory, zeros
  18. it, and returns a pointer to it. It is exactly equivalent to
  19. <A HREF=malloc.html>malloc</A>(<em>number</em>*<em>size</em>) followed
  20. by <A HREF=bzero.html>bzero</A>.
  21. <h3>Return Values</h3>
  22. calloc returns a pointer to the memory allocated. If memory cannot be
  23. obtained, NULL is returned.
  24. <h3>See Also</h3>
  25. <A HREF=malloc.html>malloc</A>,
  26. <A HREF=realloc.html>realloc</A>,
  27. <A HREF=free.html>free</A>
  28. </body>
  29. </html>