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 standard library.
std › process › Child › ResourceUsageStatistics › getMaxRss Public Function getMaxRss Doc Source Public Function std.process.Child.ResourceUsageStatistics.getMaxRss
pub inline fn getMaxRss (rus : ResourceUsageStatistics ) ?usize Params File process/Child.zig: 45
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 pub inline fn getMaxRss (rus : ResourceUsageStatistics ) ?usize {
switch (native_os ) {
.dragonfly , .freebsd , .netbsd , .openbsd , .illumos , .linux , .serenity => {
if (rus .rusage ) |ru | {
return @as (usize , @intCast (ru .maxrss )) * 1024 ;
} else {
return null ;
}
},
.windows => {
if (rus .rusage ) |ru | {
return ru .PeakWorkingSetSize ;
} else {
return null ;
}
},
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => {
if (rus .rusage ) |ru | {
// Darwin oddly reports in bytes instead of kilobytes.
return @as (usize , @intCast (ru .maxrss ));
} else {
return null ;
}
},
else => return null ,
}
}