Texas Instruments TMS320C2x User Manual page 199

Optimizing c compiler digital signal processor
Hide thumbs Also See for TMS320C2x:
Table of Contents

Advertisement

memset
memset
Syntax
Defined in
Description
minit
Syntax
Defined in
Description
7-40
Duplicate Value in Memory
#include <string.h>
void *memset(void *mem, int ch, size_t length );
memset.c in rts.src
The memset function copies the value of ch into the first length characters of
the object that mem points to. The function returns the value of mem. The
memset function is expanded inline when the −x option is used.
Reset Dynamic Memory Pool
#include <stdlib.h>
void minit(void);
memory.c in rts.src
The minit function resets all the space that was previously allocated by calls
to the malloc, calloc, or realloc functions.
The memory that minit uses is in a special memory pool or heap. The constant
_ _SYSTEM_SIZE defines the size of the heap as 1K words. You can change
this amount at link time by invoking the linker with the −heap option specifying
the desired size of the heap directly after the option. For more information, see
section 6.1.4, Dynamic Memory Allocation, on page 6-6.
Note: No Previously Allocated Objects Are Available After minit
Calling the minit function makes all the memory space in the heap available
again. Any objects that you allocated previously will be lost; do not try to
access them.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C2x and is the answer not in the manual?

This manual is also suitable for:

Tms320c2xxTms320c5x

Table of Contents