[Main]
Name=calloc
Type=Function
Subtype=tigcc.a
Header Files=alloc.h, stdlib.h
Definition=void *calloc (unsigned short NoOfItems, unsigned short SizeOfItems);
See Also=alloc.h/malloc, alloc.h/realloc, alloc.h/free, alloc.h/calloc_throw

[Library Call]
Asm=1

[Registers]
NoOfItems=d0
SizeOfItems=d1

[Description]
Allocates a memory block for a given number and size of items.

[Explanation]
calloc allocates a block of <I>NoOfItems</I>&nbsp;x&nbsp;<I>SizeOfItems</I>
bytes from the memory heap. On success, calloc returns a pointer to the newly allocated
block of memory. If not enough space exists for the new block, it returns
<A HREF="$$LINK(alloc.h/NULL)">NULL</A>. The allocated block will be cleared to zero content.
<BR><BR>
<B>Note:</B> In releases of TIGCCLIB prior to 2.0, calloc was implemented here as a macro,
Now, it is a function. It first calls <A HREF="$$LINK(alloc.h/malloc)">malloc</A>
with <I>NoOfItems</I>&nbsp;x&nbsp;<I>SizeOfItems</I> as the argument, then calls
<A HREF="$$LINK(mem.h/memset)">memset</A> if the first call was successful.

[References]
Out=alloc.h/HeapAllocPtr, mem.h/memset
In=alloc.h/calloc_throw
