pub fn cachestat(
/// The open file descriptor to retrieve statistics from.
fd: fd_t,
/// The byte range in `fd` to query.
/// When `len > 0`, the range is `[off..off + len]`.
/// When `len` == 0, the range is from `off` to the end of `fd`.
cstat_range: *const cache_stat_range,
/// The structure where page cache statistics are stored.
cstat: *cache_stat,
/// Currently unused, and must be set to `0`.
flags: u32,
) usize fd: fd_tThe open file descriptor to retrieve statistics from.
cstat_range: *const cache_stat_rangeThe byte range in fd to query. When len > 0, the range is [off..off + len]. When len == 0, the range is from off to the end of fd.
cstat: *cache_statThe structure where page cache statistics are stored.
flags: u32Currently unused, and must be set to 0.
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180pub fn cachestat(
/// The open file descriptor to retrieve statistics from.
fd: fd_t,
/// The byte range in `fd` to query.
/// When `len > 0`, the range is `[off..off + len]`.
/// When `len` == 0, the range is from `off` to the end of `fd`.
cstat_range: *const cache_stat_range,
/// The structure where page cache statistics are stored.
cstat: *cache_stat,
/// Currently unused, and must be set to `0`.
flags: u32,
) usize {
return syscall4(
.cachestat,
@as(u32, @bitCast(fd)),
@intFromPtr(cstat_range),
@intFromPtr(cstat),
flags,
);
}
Query the page cache statistics of a file.