Skip to content

TAllocationStrategy

Describes generically an allocation strategy, meaning how the memory is increased when the available memory is insufficient.

Definition

Unit: Neslib.Iceoryx2.Types

type TAllocationStrategy = (BestFit, PowerOfTwo, &Static)

Enumeration Values

BestFit = _iox2_allocation_strategy_e_BEST_FIT

Increases the memory so that it perfectly fits the new size requirements. This may lead to a lot of reallocations but has the benefit that no byte is wasted.


PowerOfTwo = _iox2_allocation_strategy_e_POWER_OF_TWO

Increases the memory by rounding the increased memory size up to the next power of two. Reduces reallocations a lot at the cost of increased memory usage.


&Static = _iox2_allocation_strategy_e_STATIC

The memory is not increased. This may lead to an out-of-memory error when allocating.