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.

c_allocator

A wrapper around the C memory allocation API which supports the full Allocator interface, including arbitrary alignment. Simple malloc calls are used when possible, but large requested alignments may require larger buffers in order to satisfy the request. As well as malloc, realloc, and free, the extension functions malloc_usable_size and posix_memalign are used when available.

heap.c_allocator
pub const c_allocator: Allocator = .

File

lib/std/heap.zig:137

Code

pub const c_allocator: Allocator = .{
    .ptr = undefined,
    .vtable = &c_allocator_impl.vtable,
}