DP_XMALLOC(2-N) SYSTEM CALLS DP_XMALLOC(2-N)
NAME
dp_xmalloc -- create a global memory region
SYNOPSIS
#include <sys/mppg.h>
void *dp_xmalloc(void *addr, long long size);
DESCRIPTION
dp_xmalloc creates a global memory region and attaches it
into the process virtual space of the calling process. The
start address of the created global memory region is
returned. addr specifies a start address of the global mem-
ory region. If 0 is specified, the address is automatically
decided by the system. For a process using 8G layout or 32G
layout, addr must be a 4MB aligned address. For a process
using 512G layout, addr must be a 64MB aligned address.
size specifies the size of the global memory region in
bytes.
The calling process must be a large page process and must
belong to an MPPG.
dp_xmalloc fails if one or more of the following are true:
[EINVAL] The calling process does not belong to an MPPG.
[EINVAL] The calling process is a small page process.
[EINVAL] addr is an illegal address.
[EINVAL] The area specified with addr and size is not
allowed by the system.
[EINVAL] The area specified with addr and size is already
used.
[ENOMEM] Such a change would result in more space being
allocated than is allowed by the system-imposed
maximum process size or maximum job size.
[ENOMEM] The process requires more memory than is allowed
by the system-imposed maximum process virtual
space.
[EAGAIN] The memory or the swap space are temporarily
insufficient.
SEE ALSO
dp_create(2), dp_join(2), dp_exit(2), dp_xmfree(2),
dp_xmshare(2), dp_xmatt(2), dp_cntl(2),
dp_kill(2), dp_resume(2)
Global Memory in the SUPER-UX Programmer's Guide
Memory Layout in the SUPER-UX User's Guide
SUPER-UX Last change: Oct 13, 1999 1
DP_XMALLOC(2-N) SYSTEM CALLS DP_XMALLOC(2-N)
DIAGNOSTICS
Upon successful completion, dp_xmalloc returns the start
address of the created global memory region. Otherwise, a
value of -1 is returned and errno is set to indicate the
error.
SUPER-UX Last change: Oct 13, 1999 2
G1AB02E Programmer's Reference Manual