AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 7

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
2.3 Memory Control Blocks
Each heap requires its own 24-byte MCB that contains all required heap information. The MCB is
defined by the following code:
typedef struct
{
} t_VSMM_MEM;
VSMMMemAddr
VSMMMemFreeList
VSMMMemBlkSize
VSMMMemNBlks
VSMMMemNFree
VSMMMemHeapAddr
void
void
INT32U uliVSMMMemBlkSize;
INT32U uliVSMMMemNBlks;
INT32U uliVSMMMemNFree;
INT32U uliVSMMMemHeapAddr;
MCB Variable
Heap Handle
Freescale Semiconductor, Inc.
0x10028
BlockSize
MemAddr
NBlocks
*pvVSMMMemAddr;
*pvVSMMMemFreeList;
FreeList
HeapPtr
For More Information On This Product,
NFree
Figure 4. Heap MCB Following its Creation
BlockHeader. Indicates the heap
to which the block belongs
Go to: www.freescale.com
0x100A0
0x100A0
(void *)0
16384
A pointer to the base address of the heap
A pointer to the next available free memory block within the heap.
The size of each block contained within this heap.
The number of blocks contained within this heap.
The number of memory blocks within this heap that are still available.
Pointer to a parent heap. If the heap associated with this MCB was created directly
from free memory, the value is NULL; otherwise, if the heap was created from a
memory block associated with another heap, the value is this heap’s handle or
address.
4
4
Table 1. MCB Contents Defined
0x100A0
0x140A8
Description
0x140A8
0x180B0
0x180B0
0x1C0B8
0x1C0B8
VSMM Basics
0x0
7

Related parts for AN2345