osf1 man page for nshmget

Query: nshmget

OS: osf1

Section: 3

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

nshmget(3)						     Library Functions Manual							nshmget(3)

NAME
nshmget - Returns (or creates) the ID for a shared memory region (libnuma library)
SYNOPSIS
#include <numa.h> #include <sys/shm.h> int nshmget( key_t key, size_t size, int shmflg, memalloc_attr_t *attr );
PARAMETERS
Specifies the key that identifies the shared memory region. The value for the key parameter can be IPC_PRIVATE or a random number other than zero (0). If the value of key is IPC_PRIVATE, it can be used to assure the return of a new, unused shared memory region. Specifies the minimum number of bytes to allocate for the region. Specifies the creation flags. See shmget(2) for a description of these flags. Points to a memory allocation policy and attributes structure. If the specified key does not exist, and a shared memory region is created, these attributes will be assigned to the memory object created to manage the shared memory region.
DESCRIPTION
If the attr argument is NULL, the nshmget() function behaves identically to the shmget() function. If the attr argument is non-NULL, it points to a memory allocation policy and attributes structure that specifies where the pages should be allocated for a newly created shared memory region. To change the policy of an existing shared memory region, use the nmadvise()function. If the mattr_policy member of the structure pointed to by attr is MPOL_DIRECTED and the mattr_rad member is RAD_NONE, the system will choose the Resource Affinity Domain (RAD) where the pages of the shared memory region will be allocated from among the RADs specified in the mattr_radset member of *attr. If the mattr_radset member is the empty set, the system will select a RAD for the memory object from among all of the RADs in the caller's partition, and the overflow set will be the empty set.
RETURN VALUES
Success. Failure. In this case, errno is set to indicate the error.
ERRORS
In addition to the error conditions for the shmget() function, the nshmget()function sets errno to one of the specified values for the specified condition: A non-NULL attr argument points to an invalid address. The structure pointed to by the attr argument contains an invalid memory allocation policy or invalid RAD. The striped allocation was requested with a stride of 0.
SEE ALSO
Functions: shmget(2), nmadvise(3), numa_intro(3) Files: numa_types(4), shmid_ds(4) nshmget(3)
Related Man Pages
shmget(2) - sunos
memalloc_attr(3) - osf1
nmadvise(3) - osf1
nshmget(3) - osf1
numa_types(4) - osf1
Similar Topics in the Unix Linux Community
How to interpret the shared memory key
shmget failed - cannot allocate memory
shmget failed - cannot allocate memory
shmget failed - cannot allocate memory
Dereferencing pointer to a shared memory struct