int
posix_fadvise(int fd, off_t offset, off_t size, int hint)
)
hints at the application's access pattern to the file and range
given by
the file descriptor,
fd,
and
offset
and
size.
If
size
is zero, it means to the end of file.
hint
should be one of the followings.
Calling
posix_fadvise()
doesn't alter the semantics of the operations,
it is only a matter of performance.
)
returns 0.
Otherwise, it returns an error number.
POSIX_FADV_WILLNEED,
POSIX_FADV_DONTNEED,
and
POSIX_FADV_NOREUSE
are not implemented.
For
POSIX_FADV_NORMAL,
POSIX_FADV_RANDOM,
and
POSIX_FADV_SEQUENTIAL,
the current implementation ignores
offset
and
size,
and applies the hint to the whole file.