Function cachestat [src]

Query the page cache statistics of a file.

Prototype

pub fn cachestat( fd: fd_t, cstat_range: *const cache_stat_range, cstat: *cache_stat, flags: u32, ) usize

Parameters

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.

Source

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 { return syscall4( .cachestat, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(cstat_range), @intFromPtr(cstat), flags, ); }