|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectposix.IPC
posix.SharedMem
public class SharedMem
A Posix shared memory segment. Shared physical memory is not supported, since this requires superuser privilege and is very hardware dependent.
| Nested Class Summary | |
|---|---|
static class |
SharedMem.shmid_ds
|
| 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(String path,
int type)
|
|
| Method Summary | |
|---|---|
CPtr |
attach()
Attach the shared memory for read/write at any available logical address. |
void |
dispose()
|
SharedMem.shmid_ds |
getStatus()
Return the permissions for this IPC data structure. |
void |
remove()
Remove this IPC data structure from the system. |
void |
setPerm(IPC.Perm st)
Set the user, group, mode for this IPC data structure. |
| Methods inherited from class posix.IPC |
|---|
finalize, ftok, getId, getPerm, isPidValid, setPerm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long SHMLBA
| Constructor Detail |
|---|
public SharedMem(int key,
int flag)
throws IPCException
IPCException
public SharedMem(int key,
int size,
int flag)
throws IPCException
key - IPC key or IPC_PRIVATEsize - size of shared memoryflag - options
IPCException
public SharedMem(String path,
int type)
throws IPCException
IPCException| Method Detail |
|---|
public SharedMem.shmid_ds getStatus()
throws IPCException
IPC
getStatus in class IPCIPCException
public void setPerm(IPC.Perm st)
throws IPCException
setPerm in class IPCst - a status obtained from IPC.getPerm() for this IPC and modified
IPCException
public CPtr attach()
throws IPCException
CPtr to the attached memory segment
IPCExceptionpublic void remove()
IPC
remove in class IPCpublic void dispose()
dispose in class IPC
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||