EasyManua.ls Logo

Texas Instruments TMS34010

Texas Instruments TMS34010
128 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
calloc
Syntax
D~scription
Example
6·6
Allocate and Clear Mtitmory
#include <memory.h>
char
·calloc(num,size)
int
num;
/*
number
of
items
to
clear * /
int
size;
/*
size
of
each item * /
calloc
This routine allocates a packet
of
memory large enough
to
contain num
objects
of
the specified size and refUrns a pointer to
it
If
it
cannot allocate
the packet (i.e.;
if
it
runs
out
of
memory).
it
returns a null pointer
(0).
This
fuhctionalso
initializes the allocated memory to all zeros. Refer to Section
e.1.1,
Specifying the Size
of
Memory
to
Managlil, for more information on
allocating memory.
ptr
=
calloc(10,2)
;
/*
allocate/clear
10
words
*/

Table of Contents

Other manuals for Texas Instruments TMS34010

Related product manuals