Query: madvise
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
madvise(2) System Calls Manual madvise(2)NAMEmadvise() - advise the system of a process's expected paging behaviorSYNOPSISDESCRIPTIONThe system call permits a process to advise the system about its expected future behavior in referencing a mapped file, an anonymous memory region, or a shared memory region. Certain implementations can use this information to optimize the use of resources. addr and len specify the address and length in bytes of the region to which the advice refers. For the address and length must be con- tained within a successful call to (see mmap(2)) or a successful call to (see shmat(2)); otherwise, fails with an [EINVAL] error. The behav argument is one the following flags defined in the header Removes any previous advice and sets the default behavior. By default, the kernel tracks access patterns on data objects and per- forms I/Os based on process trends (that is, sequential versus random). Sequential trends cause larger "read-ahead" I/Os, while random accesses reduce the amount of I/O to avoid unnecessary I/O. Informs the kernel that any objects mapped in this range will be accessed in a random matter. The kernel will read only the minimal amount of data to satisfy the user fault. Informs the kernel that any objects mapped in this range will be accessed in a sequential matter. The kernel will perform the maximum read-ahead for every fault. The kernel does not pay attention to access patterns and trends, but instead assumes sequentiality for every access on the object. Informs the kernel that the specified range is no longer needed by the process. This allows the kernel to release the physical pages associated with an address range back to the system for use by other processes. is restricted to object ranges created with calls to and Attempting to use on an object that was not created using a call to or will result in [EINVAL] being returned to the caller. Will need these pages. Ensure that resources are reserved.WARNINGSThe current implementation of defines and as null operations.RETURN VALUEreturns the following values: Successful completion. Failure. is set to indicate the error.ERRORSIf fails, is set to one of the following values. [EFAULT] The range specified by (addr, addr+len) is invalid for a process's address space, or permission was incorrect on the object for the behav specified. [EINVAL] behav contains an invalid value, or addr is not a multiple of the page size as returned by the system call [EINVAL] The address range specified by addr and len was not created by a successful call to orAUTHORwas developed by HP and OSF.SEE ALSOmmap(2), sysconf(2).STANDARDS CONFORMANCEmadvise(2)
Related Man Pages |
---|
madvise(3c) - opensolaris |
madvise(3c) - php |
madvise(3c) - xfree86 |
madvise(3c) - plan9 |
madvise(3c) - ultrix |
Similar Topics in the Unix Linux Community |
---|
Malware trends |
File Status 92 reading a sequential file |
Would you like to advise a beginner ! |