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: u29) type

Parameters

Item: typealignment: u29

Source

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