11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fixed block size memory poolsPrototypevoid* OS_MEMF_AllocTimed (OS_MEMF* pMEMF,int Timeout,int Purpose);ParameterDescriptionpMEMFPointer to the control data structure of memory pool.TimeoutTimelimit before timeout, given in ticks. 0 or negative values are permitted.PurposeThis is a parameter which is used for debugging purpose only. Its value has no effect on programexecution, but may be remembered in debug builds to allow runtime analysis of memoryallocation problems.Table 103: OS_MEMF_Alloc_Timed()Return value!=NULL pointer to the allocated blockNULL if no block has been allocated.Additional InformationIf there is no free memory block in the pool, the calling task is suspended until a memory block becomes available orthe timeout has expired. The retrieved pointer must be delivered to OS_MEMF_Release() as parameter to free thememory block. The pointer must not be modified.OS_MEMF_Request()DescriptionRequests allocation of a memory block. Continues execution in any case.Prototypevoid* OS_MEMF_Request (OS_MEMF* pMEMF,int Purpose);ParameterDescriptionpMEMFPurposeTable 104: OS_MEMF_Request() parameter listReturn value!=NULL pointer to the allocated blockNULL if no block has been allocated.Additional InformationThe calling task is never suspended by calling OS_MEMF_Request(). The retrieved pointer must be delivered toOS_MEMF_Release() as parameter to free the memory block. The pointer must not be modified.OS_MEMF_Release()DescriptionReleases a memory block that was previously allocated.PrototypePointer to the control data structure of memory pool.This is a parameter which is used for debugging purpose only. Its value has no effect on programexecution, but may be remembered in debug builds to allow runtime analysis of memoryallocation problems.void OS_MEMF_Release (OS_MEMF* pMEMF,void* pMemBlock);ParameterDescriptionpMEMFpMemBlockTable 105: OS_MEMF_Release() parameter listPointer to the control data structure of memory pool.Pointer to the memory block to free.PP<strong>RTOS</strong>-293

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!