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.

validationWrap

Wraps an allocator with basic validation checks. Asserts that allocation sizes are greater than zero and returned pointers have correct alignment.

mem.validationWrap
pub fn validationWrap(allocator: anytype) ValidationAllocator(@TypeOf(allocator))

File

lib/std/mem.zig:177

Code

pub fn validationWrap(allocator: anytype) ValidationAllocator(@TypeOf(allocator)) {
    return ValidationAllocator(@TypeOf(allocator)).init(allocator);
}