AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 25

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Example Usage
6.5 VSMMMemFree()
Syntax
Description
Parameters
Return Value
Error Checks
Example Usage
6.6 VSMMMemDestroy()
Syntax
Description
Parameters
Return Value
Error Checks
Example Usage
6.7 VSMMMemQuery()
Syntax
Description
Parameters
Return Value
Error Checks
Example Usage
VSMM_MEM_NO_FREE_BLKS. If there are no more free memory blocks, within this heap, to allocate
to the caller.
apucBlockPtrArray2[0] = \
(unsigned char *) VSMMMemAlloc(pstHeap2Ptr, &ucErrCode);
INT8U
Determines heap of the specified memory block and returns the memory block to the identified heap.
*pvPBlk. A pointer to the memory block being freed.
VSMM_NO_ERR. If the memory block is successfully freed.
VSMM_MEM_FULL. If you are returning a memory block to an already FULL heap.
VSMM_NO_ERR. If the memory block was successfully freed.
VSMM_MEM_FULL. If you are returning a memory block to an already FULL heap.
ucErrCode = VSMMMemFree(apucBlockPtrArray2[0]);
INT8U
Removes a heap from the system and if the eliminated heap was created from a memory block belonging
to another heap, this memory block is freed as well.
*pstPMem. A pointer to the memory control block of the heap being destroyed.
VSMM_NO_ERR. If the memory block is successfully freed.
VSMM_MEM_INVALID_PART. Partition does not exist.
VSMM_NO_ERR. If the memory block is successfully freed.
VSMM_MEM_INVALID_PART. Partition does not exist.
ucErrCode = VSMMMemDestroy(pstHeap2Ptr);
INT8U
t_VSMM_MEM_DATA *pstPData)
Reports the state of the specified heap by dumping the contents of its associated memory control block.
Use this function to determine how many free memory blocks are still available, how many memory
blocks are in use, and whether this heap was created from a memory block of another heap.
*pstPMem. A pointer to the memory control block of the heap being queried.
*pstPData. A pointer to the structure to contain the information about the specified heap.
VSMM_NO_ERR. Always returned.
None
ucErrCode = VSMMMemQuery(pstHeap2Ptr, &stPartQ);
VSMMMemFree (void *pvPBlk)
VSMMMemDestroy (t_VSMM_MEM *pstPMem)
VSMMMemQuery (t_VSMM_MEM *pstPMem,
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
VSSM Functions
25

Related parts for AN2345