Module sys/advise

sys/advise

Kernel advisory hints.

Advisory wrappers for file and memory access pattern hints. Returns 0 on success, -errno / negative platform error on failure.

Functions

fadvise function
fn(fd : i32, offset : i64, len : i64, advice : i32) -> i32

Parameters

NameTypeNotes
fdi32
offseti64
leni64
advicei32

Returns: i32

madvise function
fn(addr : *(u8), length : usize, advice : i32) -> i32

Parameters

NameTypeNotes
addr*(u8)
lengthusize
advicei32

Returns: i32

Constants

POSIX_FADV_NORMAL constant i32

Value: 0

POSIX_FADV_RANDOM constant i32

Value: 1

POSIX_FADV_SEQUENTIAL constant i32

Value: 2

POSIX_FADV_WILLNEED constant i32

Value: 3

POSIX_FADV_DONTNEED constant i32

Value: 4

POSIX_FADV_NOREUSE constant i32

Value: 5

MADV_NORMAL constant i32

Value: 0

MADV_RANDOM constant i32

Value: 1

MADV_SEQUENTIAL constant i32

Value: 2

MADV_WILLNEED constant i32

Value: 3

MADV_DONTNEED constant i32

Value: 4