nmmap(3)nmmap(3)NAMEnmmap - Maps an open file into a process's address space (libnuma
library).
SYNOPSIS
#include <numa.h> #include <sys/mman.h>
void *nmmap(
void *addr,
size_t len,
int prot,
ulong_t flags,
int filedes,
off_t off,
memalloc_attr_t *attr );
PARAMETERS
The parameters for nmmap() are the same as for mmap() with the addition
of the following NUMA-specific parameter: Points to a memory allocation
policy and attributes structure that will be assigned to the memory
object created by the mapping.
See mmap(2) for descriptions of the remaining parameters.
DESCRIPTION
If the attr argument is NULL, the nmmap() function behaves identically
to the mmap() function. If the attr argument is non-NULL, it points to
a memory allocation policy and attributes structure that specifies
where the pages for the new memory object should be allocated.
If, in the structure pointed to by attr, the value of mattr_policy is
MPOL_DIRECTED and the value of mattr_rad is RAD_NONE, the mattr_radset
value specifies the set of Resource Affinity Domains (RADs) from which
the system will choose the RAD where the pages of the new memory object
will be allocated. If mattr_radset is set to NULL, the system will
select a RAD for the memory object from among all the RADs in the call‐
er's partition. In this case, the memory object's overflow set will
also be the set of all RADs in the caller's partition.
RETURN VALUES
Success. A value returned to addr indicates success and is the starting
address of the region (truncated to the nearest page boundary) where
the new memory object has been mapped. Failure. In this case, errno
is set to indicate the error.
ERRORS
If the nmmap() function fails, it sets errno to one of the values
described in the ERRORS section of mmap(2), or to one of the following
values for the reason specified: A non-NULL attr argument points to an
invalid address. The structure pointed to by the attr argument con‐
tains an invalid memory allocation policy, an invalid RAD, or an
invalid RAD set.
SEE ALSO
Functions: mmap(2), nmadvise(3), numa_intro(3)
Files: numa_types(4)nmmap(3)