SYS/BIOS  7.00
Data Fields
HeapMem_Params Struct Reference

#include <ti/sysbios/heaps/HeapMem.h>

Data Fields

size_t minBlockAlign
 Minimum alignment for each block allocated. More...
 
void * buf
 Buffer being managed by this heap instance. More...
 
size_t size
 Size of buffer being managed by this heap instance. More...
 

Field Documentation

§ minBlockAlign

size_t HeapMem_Params::minBlockAlign

Minimum alignment for each block allocated.

This parameter dictates the minimum alignment for each block that is allocated. If an alignment request of greater than minBlockAlign is made in the alloc, it will be honored. If an alignment request of less than minBlockAlign is made, the request will be ignored and minBlockAlign will be used.

prms.minBlockAlign = 32;
handle = HeapMem_create(&prms, &eb);
...
// buf will be aligned on a 32 MAU boundary
buf = Memory_alloc(HeapMem_Handle_upCast(handle), SIZE, 8, &eb);
// buf will be aligned on a 64 MAU boundary
buf = Memory_alloc(HeapMem_Handle_upCast(handle), SIZE, 64, &eb);

The default alignment is 0 (which means this parameter is ignored).

§ buf

void* HeapMem_Params::buf

Buffer being managed by this heap instance.

This parameter is ignored in the static HeapMem.create() call. It is a required parameter in the dynamic HeapMem_create() call.

HeapMem requires that the buffer be aligned on a target-specific minimum alignment, and will adjust the buffer's start address and size as necessary to satisfy this requirement.

§ size

size_t HeapMem_Params::size

Size of buffer being managed by this heap instance.

The usable size may be smaller depending on alignment requirements.


The documentation for this struct was generated from the following file:
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale