SYS/BIOS
7.00
|
#include <ti/sysbios/heaps/HeapBuf.h>
Data Fields | |
IHeap_Object | iheap |
Queue_Elem | objElem |
size_t | blockSize |
Size (in MAUs) of each block. More... | |
size_t | align |
Alignment (in MAUs) of each block. More... | |
unsigned int | numBlocks |
Number of fixed-size blocks. More... | |
size_t | bufSize |
Size (in MAUs) of the entire buffer; for dynamic creates only. More... | |
char * | buf |
User supplied buffer; for dynamic creates only. More... | |
unsigned int | numFreeBlocks |
unsigned int | minFreeBlocks |
Queue_Struct | freeList |
IHeap_Object HeapBuf_Struct::iheap |
Queue_Elem HeapBuf_Struct::objElem |
size_t HeapBuf_Struct::blockSize |
Size (in MAUs) of each block.
HeapBuf will round the blockSize up to the nearest multiple of the alignment, so the actual blockSize may be larger. When creating a HeapBuf dynamically, this needs to be taken into account to determine the proper buffer size to pass in.
Required parameter.
The default size of the blocks is 0 MAUs.
size_t HeapBuf_Struct::align |
Alignment (in MAUs) of each block.
The alignment must be a power of 2 that is greater than or equal to the target dependent value defined by Memory_getMaxDefaultTypeAlign. If the default value of 0 is specified, this value will be changed to be the minimum structure alignment requirement, as defined by Memory_getMaxDefaultTypeAlign.
For static creates, the HeapBuf module will allocate space for the buffer and will align it on this requested alignment.
For dynamic creates, this parameter is used solely for error checking. The buffer provided to a dynamically created HeapBuf must be aligned manually, and an assert will be raised if the buffer is not properly aligned. For dynamic creates, HeapBuf will NOT adjust the buffer to satisfy the alignment.
unsigned int HeapBuf_Struct::numBlocks |
Number of fixed-size blocks.
Required parameter.
The default number of blocks is 0.
size_t HeapBuf_Struct::bufSize |
Size (in MAUs) of the entire buffer; for dynamic creates only.
When dynamically creating a HeapBuf, this should be the actual size of the memory buffer provided for HeapBuf to manage.
This parameter is used solely for error checking; an Error is raised if the bufSize is too small for the requested blockSize and numBlocks. Because of minimum alignment considerations, it's easy to provide too small of a buffer to manage, and difficult to detect if it happened.
This parameter is required for dynamic creates and ignored for static creates.
The default buffer size is 0 MAUs.
char* HeapBuf_Struct::buf |
User supplied buffer; for dynamic creates only.
The caller must supply the memory buffer for a dynamically created HeapBuf to manage. The provided buffer must be aligned according to the HeapBuf's alignment parameter. i.e., if a buffer's alignment parameter is 128, then the buffer's start address must be a multiple of 128.
For static creates, the buffer is allocated automatically based on the blockSize and numBlocks parameters.
This parameter is required for dynamic creates and ignored for static creates.
unsigned int HeapBuf_Struct::numFreeBlocks |
unsigned int HeapBuf_Struct::minFreeBlocks |
Queue_Struct HeapBuf_Struct::freeList |