static final class PageManager.Unix extends PageManager
PageManager.Unix, PageManager.WindowsPROT_EXEC, PROT_READ, PROT_WRITE| Constructor and Description |
|---|
Unix() |
| Modifier and Type | Method and Description |
|---|---|
long |
allocatePages(int npages,
int protection)
Allocates native memory pages.
|
void |
freePages(long address,
int npages)
Free pages allocated via
PageManager.allocatePages(int, int) |
void |
protectPages(long address,
int npages,
int protection)
Sets the protection mask on a memory region.
|
getInstance, pageSizepublic long allocatePages(int npages,
int protection)
PageManagerPageManager.pageSize.allocatePages in class PageManagernpages - The number of pages to allocate.protection - The initial protection for the page. This must be a
bitmask of PageManager.PROT_READ, PageManager.PROT_WRITE and PageManager.PROT_EXEC.public void freePages(long address,
int npages)
PageManagerPageManager.allocatePages(int, int)freePages in class PageManageraddress - The memory address as returned from PageManager.allocatePages(int, int)npages - The number of pages to free.public void protectPages(long address,
int npages,
int protection)
PageManagerprotectPages in class PageManageraddress - The start of the memory region.npages - The number of pages to protect.protection - The protection mask.