posix
Class SharedMem
java.lang.Object
posix.IPC
posix.SharedMem
public class SharedMem
- extends IPC
A Posix shared memory segment. Shared physical memory is not supported,
since this requires superuser privilege and is very hardware dependent.
Nested classes/interfaces inherited from class posix.IPC |
IPC.Perm |
Field Summary |
static long |
SHMLBA
The modulus for attaching shared memory by logical address. |
Fields inherited from class posix.IPC |
egid, euid, id, IPC_ALLOC, IPC_CI, IPC_CREAT, IPC_EXCL, IPC_NOCLEAR, IPC_NOWAIT, IPC_PHYS, IPC_PRIVATE, owner, pid |
Constructor Summary |
SharedMem(int key,
int flag)
Attach an existing shared memory segment. |
SharedMem(int key,
int size,
int flag)
Attach or create a shared memory segment. |
SharedMem(java.lang.String path,
int type)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHMLBA
public static final long SHMLBA
- The modulus for attaching shared memory by logical address. This
is system dependent and therefore computed by the class initializer.
While attaching shared memory to a specific address is somewhat
system dependent, it is easily handled by configuration or property
settings.
SharedMem
public SharedMem(int key,
int flag)
throws IPCException
- Attach an existing shared memory segment.
- Throws:
IPCException
SharedMem
public SharedMem(int key,
int size,
int flag)
throws IPCException
- Attach or create a shared memory segment.
- Parameters:
key
- IPC key or IPC_PRIVATEsize
- size of shared memoryflag
- options
- Throws:
IPCException
SharedMem
public SharedMem(java.lang.String path,
int type)
throws IPCException
- Throws:
IPCException
getStatus
public SharedMem.shmid_ds getStatus()
throws IPCException
- Throws:
IPCException
getPerm
public IPC.Perm getPerm()
throws IPCException
- Description copied from class:
IPC
- Return the permissions for this IPC data structure.
- Specified by:
getPerm
in class IPC
- Throws:
IPCException
attach
public CPtr attach()
throws IPCException
- Throws:
IPCException
remove
public void remove()
- Description copied from class:
IPC
- Remove this IPC data structure from the system.
- Specified by:
remove
in class IPC
dispose
public void dispose()
- Overrides:
dispose
in class IPC