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.

Additional InformationThe pMemBlock pointer has to be the one that was delivered form any retrival function described above. The pointermust not be modified between allocation and release. The memory block becomes available for other tasks waiting fora memory block from the pool. If any task is waiting for a fixed memory block, it is activated according to the rules ofthe scheduler.OS_MEMF_FreeBlock()DescriptionReleases a memory block that was previously allocated. The memory pool does not need to be denoted.Prototypevoid OS_MEMF_FreeBlock (void* pMemBlock);ParameterDescriptionpMemBlockPointer to the memory block to free.Table 106: OS_MEMF_FreeBlock() parameter listAdditional InformationThe pMemBlock pointer has to be the one that was delivered form any retrieval function described above. The pointermust not be modified between allocation and release. This function may be used instead of OS_MEMF_Release(). Ithas the advantage that only one parameter is needed. <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> itself will find the associated memory pool.The memory block becomes available for other tasks waiting for a memory block from the pool. If any task is waitingfor a fixed memory block, it is activated according to the rules of the scheduler.OS_MEMF_GetNumBlocks()DescriptionInformation routine to examine the total number of available memory blocks in the pool.Prototypeint OS_MEMF_GetNumBlocks (OS_MEMF* pMEMF);ParameterDescriptionpMEMFTable 107: OS_MEMF_GetNumBlocks() parameter listReturn valueReturns the number of blocks in the specified memory pool. This is the value that was given as parameter duringcreation of the memory pool.OS_MEMF_GetBlockSize()DescriptionInformation routine to examine the size of one memory block in the pool.Prototypeint OS_MEMF_GetBlockSize (OS_MEMF* pMEMF);ParameterDescriptionpMEMFTable 108: OS_MEMF_GetBlockSize() parameter listReturn valueSize in bytes of one memory block in the specified memory pool. This is the value of the parameter when the memorypool was created.OS_MEMF_GetNumFreeBlocks()DescriptionPointer to the control data structure of memory pool.Pointer to the control data structure of memory pool.Information routine to examine the number of free memory blocks in the pool.94<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>for ARM CoresPP<strong>RTOS</strong>-2

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

Saved successfully!

Ooh no, something went wrong!