MEM Module
2-212
To create a MEM object in a configuration script, use the following syntax.
The Tconf examples that follow assume the object has been created as
shown here.
var myMem = bios.MEM.create("myMem");
The following properties can be set for a MEM object in the MEM Object
Properties dialog of the DSP/BIOS Configuration Tool or in a Tconf script:
❏
comment
. Type a comment to identify this MEM object.
Tconf Name: comment
Type: String
Example:
myMem.comment = "my MEM";
❏
base
. The address at which this memory segment begins. This value
is shown in hex.
Tconf Name: base
Type: Numeric
Example:
myMem.base = 0x000000;
❏
len
. The length of this memory segment in MADUs. This value is
shown in hex.
Tconf Name: len
Type: Numeric
Example:
myMem.len = 0x000000;
❏
create a heap in this memory
. If this property is set to true, a heap
is created in this memory segment. Memory can by allocated
dynamically from a heap. In order to remove the heap from a memory
segment, you can select another memory segment that contains a
heap for properties that dynamically allocate memory in this memory
segment. The properties you should check are in the Memory
Section Manager (the Segment for DSP/BIOS objects and Segment
for malloc/free properties) and the Task Manager (the Default stack
segment for dynamic tasks property). If you disable dynamic memory
allocation in the Memory Section Manager, you cannot create a heap
in any memory segment.
Tconf Name: createHeap
Type: Bool
Example:
myMem.createHeap = true;
❏
heap size
. The size of the heap in MADUs to be created in this
memory segment. You cannot control the location of the heap within
its memory segment except by making the segment and heap the
same sizes. Note that if the base of the heap ends up at address 0x0,
the base address of the heap is offset by MEM_HEADERSIZE and
the heap size is reduced by MEM_HEADERSIZE.