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.

enable_hints

Hhinting is disabled on operating systems that make an effort to not reuse mappings. For example, OpenBSD aggressively randomizes addresses of mappings that don't provide a hint (for security reasons, but it serves our needs too).

PageAllocator.enable_hints
const enable_hints = switch (builtin.target.os.tag)

File

lib/std/heap/PageAllocator.zig:26

Code

const enable_hints = switch (builtin.target.os.tag) {
    .openbsd => false,
    else => true,
}