
memset
7-40
Duplicate Value in Memory
memset
Syntax
#include <string.h>
void *
memset
(void *mem, int ch, size_t length);
Defined in
memset.c in rts.src
Description
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
minit
Syntax
#include <stdlib.h>
void
minit
(void);
Defined in
memory.c in rts.src
Description
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
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.
Содержание TMS320C2x
Страница 8: ...viii...
Страница 69: ...2 47 C Compiler Description...
Страница 159: ...6 36...
Страница 226: ...8 6...
Страница 250: ...Index Index 14 Z z shell option 2 2 2 4 2 14 overriding with c option 4 5 overriding with n option 2 13...