MEM Module
Application Program Interface
2-203
Instance Configuration Parameters
Description
The MEM module provides a set of functions used to allocate storage
from one or more disjointed segments of memory. These memory
segments are specified with Tconf.
MEM always allocates an even number of MADUs and always aligns
buffers on an even boundary. This behavior is used to insure that free
buffers are always at least two MADUs in length. This behavior does not
preclude you from allocating two 512 buffers from a 1K region of on-
device memory, for example. It does, however, mean that odd allocations
consume one more MADU than expected.
If small code size is important to your application, you can reduce code
size significantly by removing the capability to dynamically allocate and
free memory. To do this, set the "No Dynamic Memory Heaps" property
for the MEM manager to true. If you remove this capability, your program
cannot call any of the MEM functions or any object creation functions
(such as TSK_create). You need to create all objects to be used by your
program statically (with Tconf). You can also create or remove the
dynamic memory heap from an individual memory segment in the
configuration.
Software modules in DSP/BIOS that allocate storage at run-time use
MEM functions; DSP/BIOS does not use the standard C function malloc.
DSP/BIOS modules use MEM to allocate storage in the segment
selected for that module with Tconf.
LOADHWISEG
Reference
prog.get("SARAM")
LOADHWIVECSEG
Reference
prog.get("VECT")
LOADRTDXTEXTSEG Reference
prog.get("SARAM")
Name
Type
Default (Enum Options)
comment
String
"<add comments here>"
base
Numeric
0x000000
len
Numeric
0x000000
createHeap
Bool
true
heapSize
Numeric
0x03f80
enableHeapLabel
Bool
false
heapLabel
Extern
prog.extern("segment_name","asm")
space
EnumString
"code/data" ("io")
C55x Name
Type
Default