...
Function | Description | Use case |
---|---|---|
Mem_SegAlloc() | General-purpose allocation function. It will provide a buffer aligned on a CPU word boundary and with no guaranteed padding. | General purpose buffers and control data accessed only by the CPU. |
Mem_SegAllocExt() | Same as Mem_SegAlloc() , except that this function allows specifying an alignment. It will also provide the amount of bytes required to prevent overflow when the memory segment's size limit is exceeded. | General purpose buffers and control data accessed only by the CPU but that require specific alignment (for example, task stacks). |
Mem_SegAllocHW() | Allocates a buffer using specified alignment. This function will also add padding at the end of the buffer according to the padding_align argument specified at the creation of the memory segment. This is particularly useful on systems that use cache memory as it allows to have nothing else than the buffer mapped on a cache lineover all its associated cache lines. | Data buffers that can be copied via a DMA engine. |
...