Provides advisory information to the system regarding future behavior of the application with respect to a given range of memory.
This function advises the system on the expected future behavior of the application with regard to a given range of memory. The system can take this advice into account when performing operations on the data in memory specified by this function. The advice is given over the range covered by the offset parameter and continuing for the number of bytes specified by the addr parameter and continuing for the number of bytes specified by the len parameter.
Item | Description |
---|---|
addr | Defines the beginning of the range of memory to be advised |
len | Determines the length of the address range |
advice | Defines the advice to be given |
Upon successful completion, the posix_fadvise subroutine returns 0. Otherwise, one of the following error codes will be returned.
Item | Description |
---|---|
EINVAL | The value of the advice parameter is invalid |
ENOMEM | Addresses in the range specified by the addr parameter and the len parameter are partially or completely outside the range of the process's address space. |