public class Shm extends Object
| Constructor and Description |
|---|
Shm() |
| Modifier and Type | Method and Description |
|---|---|
static long |
attach(String filename,
long pool)
Attach to a shared memory segment that was created
by another process.
|
static long |
baseaddr(long m)
Retrieve the base address of the shared memory segment.
|
static ByteBuffer |
buffer(long m)
Retrieve new ByteBuffer base address of the shared memory segment.
|
static long |
create(long reqsize,
String filename,
long pool)
Create and make accessible a shared memory segment.
|
static int |
destroy(long m)
Destroy a shared memory segment and associated memory.
|
static int |
detach(long m)
Detach from a shared memory segment without destroying it.
|
static int |
remove(String filename,
long pool)
Remove shared memory segment associated with a filename.
|
static long |
size(long m)
Retrieve the length of a shared memory segment in bytes.
|
public static long create(long reqsize,
String filename,
long pool)
throws Error
reqsize - The desired size of the segment.filename - The file to use for shared memory on platforms that
require it.pool - the pool from which to allocate the shared memory
structure.Errorpublic static int remove(String filename, long pool)
filename - The filename associated with shared-memory segment which
needs to be removedpool - The pool used for file operationspublic static int destroy(long m)
m - The shared memory segment structure to destroy.public static long attach(String filename, long pool) throws Error
filename - The file used to create the original segment.
(This MUST match the original filename.)pool - the pool from which to allocate the shared memory
structure for this process.Errorpublic static int detach(long m)
m - The shared memory structure representing the segment
to detach from.public static long baseaddr(long m)
m - The shared memory segment from which to retrieve
the base address.public static long size(long m)
m - The shared memory segment from which to retrieve
the segment length.public static ByteBuffer buffer(long m)
m - The shared memory segment from which to retrieve
the base address.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.