EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 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
Page #124 background imageLoading...
Page #124 background image
Allocate
Memory
malloc
Syntax
#include
<stdlib.h>
void
*malloc(size)
size-t
size;
/*
size
of
block
in
bytes
*/
Defined
in
memory.
c in
rts.
src
Description
The malloc function allocates space for
an
object
of
size
bytes and returns
a pointer
to
the space.
If
malloc cannot allocate the packet (that
is,
if
it
runs
out
of
memory),
it
returns a null pointer
(0).
This function does
not
modify
the memory
it
allocates.
The memory that malloc
uses
is
in
a special memory pool or heap. A C
module called
memory.
c
reserves
memory for the heap
in
the .bss section.
The constant MEMORY-SIZE defines the size
of
the heap
as
1000 bytes.
If
necessary, you can change the size
of
the heap by change the value
of
MEMORY-SIZE and reassembling
memory.
c.
For more information,
see
Section 5.1.3, Dynamic Memory Allocation, on page
5-4.
6-49

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals