Type Function MemoryPoolAligned [src]

Alias for std.heap.memory_pool.MemoryPoolAligned

A memory pool that can allocate objects of a single type very quickly. Use this when you need to allocate a lot of objects of the same type, because It outperforms general purpose allocators.

Prototype

pub fn MemoryPoolAligned(comptime Item: type, comptime alignment: Alignment) type

Parameters

Item: typealignment: Alignment

Source

pub fn MemoryPoolAligned(comptime Item: type, comptime alignment: Alignment) type { if (@alignOf(Item) == comptime alignment.toByteUnits()) { return MemoryPoolExtra(Item, .{}); } else { return MemoryPoolExtra(Item, .{ .alignment = alignment }); } }