osf1 man page for nmadvise

Query: nmadvise

OS: osf1

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

nmadvise(3)						     Library Functions Manual						       nmadvise(3)

NAME
nmadvise - Advise the system of the expected paging behavior of a process (libnuma).
SYNOPSIS
#include <numa.h> #include <sys/nman.h> int nmadvise( void *addr, long len, int behav, memalloc_attr_t *attr );
PARAMETERS
The parameters to the nmadvise() function are the same as for madvise(), with the addition of the attr parameter: Points to the starting address of one memory region, or a list of starting addresses and lengths for multiple regions, to which the advice refers. If a positive value, specifies the length, in bytes, of one region starting at the address specified by the addr parameter. If a negative value, specifies that the addr parameter points to an array of regions (an array of starting addresses and their lengths). In this case, -len indicates the number of regions in the array. See the description of the nmemalloc_range_t type in numa_types(4) for more information about the type used for array elements. Specifies the behavior of the region. See DESCRIPTION for details. Points to a structure containing the memory allocation policy and attributes that will be assigned to the region or regions specified by the addr and len parameters.
DESCRIPTION
The nmadvise() function permits a process to advise the system about its expected future behavior in referencing a mapped file or shared memory region. The nmadvise() function supports the following flags for the behav parameter, in addition to those documented in madvise(2): Prepare the specified range or object for migration to the memory regions specified by the memory allocation policy attributes. Without this flag, only new allocations occur from the regions specified by the new allocation policy attributes. This flag may be logically ORed with the MADV_CURRENT flag to indicate that the application should wait for migration to occur. Without this flag, the nmadvise() function may return before all of the pages in the range have been migrated or replicated, subject to resource availability. If the requested resources are not available, the function will terminate when the resources are exhausted. See MADV_INSIST. When used in conjunction with MADV_WAIT, when the requested resource is exhausted, the remaining memory will be paged out to the backing store. If, in the structure pointed to by attr, the mattr_policy member is MPOL_DIRECTED and the mattr_rad member is RAD_NONE, the mattr_radset member specifies the set of Resource Affinity Domains (RADs) where the pages of the specified range will be allocated. If the mattr_radset member is NULL, the system will select a RAD for the memory object from among all of the RADs in the caller's parti- tion. In this case, the overflow set will be NULL. If the attr parameter is NULL, any behav flags specific to nmadvise()are ignored, and the function is equivalent to madvise().
NOTES
As with madvise(), the behaviors specified with nmadvise() are considered by the system to be hints, and may in fact, be unimplemented. Unimplemented behaviors will always return success.
RETURN VALUES
Success. Failure. In this case, errno is set to indicate the error.
ERRORS
If the nmadvise() function fails, it sets errno is set to one of the following values for the reason specified: A non-NULL attr argument points to an invalid address. The behav parameter is invalid. The structure pointed to by the attr argument contains an invalid memory allocation policy, an invalid RAD, or an invalid RAD set. The behav parameter specifies MADV_SPACEAVAIL, and resources cannot be reserved.
SEE ALSO
Functions: madvise(2), nmmap(3), numa_intro(3) Files: numa_types(4) nmadvise(3)
Related Man Pages
madvise(2) - mojave
madvise(2) - osx
madvise(2) - hpux
nmmap(3) - osf1
rad_bind_pid(3) - osf1