|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kenai.jffi.PageManager
public abstract class PageManager
Manages allocation, disposal and protection of native memory pages
| Field Summary | |
|---|---|
static int |
PROT_EXEC
The memory should be executable |
static int |
PROT_READ
The memory should be readable |
static int |
PROT_WRITE
The memory should be writable |
| Constructor Summary | |
|---|---|
PageManager()
|
|
| Method Summary | |
|---|---|
abstract long |
allocatePages(int npages,
int protection)
Allocates native memory pages. |
abstract void |
freePages(long address,
int npages)
Free pages allocated via allocatePages(int, int) |
static PageManager |
getInstance()
Gets the page manager for the current platform. |
long |
pageSize()
Gets the system page size. |
abstract void |
protectPages(long address,
int npages,
int protection)
Sets the protection mask on a memory region. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PROT_EXEC
public static final int PROT_READ
public static final int PROT_WRITE
| Constructor Detail |
|---|
public PageManager()
| Method Detail |
|---|
public static PageManager getInstance()
public final long pageSize()
public abstract long allocatePages(int npages,
int protection)
pageSize.
npages - The number of pages to allocate.protection - The initial protection for the page. This must be a
bitmask of PROT_READ, PROT_WRITE and PROT_EXEC.
public abstract void freePages(long address,
int npages)
allocatePages(int, int)
address - The memory address as returned from allocatePages(int, int)npages - The number of pages to free.
public abstract void protectPages(long address,
int npages,
int protection)
address - The start of the memory region.npages - The number of pages to protect.protection - The protection mask.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||