feature. See also
. The project being documented here (as the example) is the Zig library itself.
c.rlimit_resource
pub const rlimit_resource = switch (native_os)
File
Code
pub const rlimit_resource = switch (native_os) {
.linux => linux.rlimit_resource,
.emscripten => emscripten.rlimit_resource,
.openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
CPU = 0,
FSIZE = 1,
DATA = 2,
STACK = 3,
CORE = 4,
RSS = 5,
MEMLOCK = 6,
NPROC = 7,
NOFILE = 8,
_,
pub const AS: rlimit_resource = .RSS;
},
.freebsd => enum(c_int) {
CPU = 0,
FSIZE = 1,
DATA = 2,
STACK = 3,
CORE = 4,
RSS = 5,
MEMLOCK = 6,
NPROC = 7,
NOFILE = 8,
SBSIZE = 9,
VMEM = 10,
NPTS = 11,
SWAP = 12,
KQUEUES = 13,
UMTXP = 14,
_,
pub const AS: rlimit_resource = .VMEM;
},
.illumos => enum(c_int) {
CPU = 0,
FSIZE = 1,
DATA = 2,
STACK = 3,
CORE = 4,
NOFILE = 5,
VMEM = 6,
_,
pub const AS: rlimit_resource = .VMEM;
},
.netbsd => enum(c_int) {
CPU = 0,
FSIZE = 1,
DATA = 2,
STACK = 3,
CORE = 4,
RSS = 5,
MEMLOCK = 6,
NPROC = 7,
NOFILE = 8,
SBSIZE = 9,
VMEM = 10,
NTHR = 11,
_,
pub const AS: rlimit_resource = .VMEM;
},
.dragonfly => enum(c_int) {
CPU = 0,
FSIZE = 1,
DATA = 2,
STACK = 3,
CORE = 4,
RSS = 5,
MEMLOCK = 6,
NPROC = 7,
NOFILE = 8,
SBSIZE = 9,
VMEM = 10,
POSIXLOCKS = 11,
_,
pub const AS: rlimit_resource = .VMEM;
},
.haiku => enum(i32) {
CORE = 0,
CPU = 1,
DATA = 2,
FSIZE = 3,
NOFILE = 4,
STACK = 5,
AS = 6,
NOVMON = 7,
_,
},
.serenity => enum(c_int) {
CORE = 1,
CPU = 2,
DATA = 3,
FSIZE = 4,
NOFILE = 5,
STACK = 6,
AS = 7,
_,
},
else => void,
}