Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

MemoryPool

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. Functions that potentially allocate memory accept an Allocator parameter.

heap.MemoryPool
pub fn MemoryPool(comptime Item: type) type

File

lib/std/heap.zig:32

Code

pub fn MemoryPool(comptime Item: type) type {
    return memory_pool.Extra(Item, .{ .alignment = null });
}