Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Constant

c_allocator

Public Constant
std.heap.c_allocator
pub const c_allocator: 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.

File

heap.zig:137
137
138
139
140
pub const c_allocator: Allocator = .{
    .ptr = undefined,
    .vtable = &c_allocator_impl.vtable,
}