posix_fadvise - file advisory information
#include <fcntl.h> int posix_fadvise(int fd, off_t offset, off_t len, int advice);
The posix_fadvise() function advises the system on the expected behavior of the application with respect to the data in the file associated with the open file descriptor, fd, starting at offset and continuing for len bytes. The specified range need not currently exist in the file. If len is zero, all data following offset is specified. The system may use this information to optimize handling of the specified data. The posix_fadvise() function has no effect on the semantics of other operations on the specified data, although it may affect the performance of other operations.
The advice to be applied to the data is specified by the advice parameter and may be one of the following values:
POSIX_FADV_NORMAL
POSIX_FADV_SEQUENTIAL
POSIX_FADV_RANDOM
POSIX_FADV_WILLNEED
POSIX_FADV_DONTNEED
POSIX_FADV_NOREUSE
These values are defined in <fcntl.h>
Upon successful completion, posix_fadvise() returns zero. Otherwise, an error number is returned to indicate the error.
The posix_fadvise() function will fail if:
EBADF
EINVAL
ESPIPE
The posix_fadvise() function has a transitional interface for 64-bit file offsets. See lf64(5).
See attributes(5) for descriptions of the following attributes:
|
posix_madvise(3C), attributes(5), standards(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |