static final class PageManager.Windows extends PageManager
PageManager.Unix, PageManager.WindowsPROT_EXEC, PROT_READ, PROT_WRITE| Constructor and Description |
|---|
Windows() |
| Modifier and Type | Method and Description |
|---|---|
long |
allocatePages(int pageCount,
int protection)
Allocates native memory pages.
|
void |
freePages(long address,
int pageCount)
Free pages allocated via
PageManager.allocatePages(int, int) |
void |
protectPages(long address,
int pageCount,
int protection)
Sets the protection mask on a memory region.
|
private static int |
w32prot(int p) |
getInstance, pageSizepublic long allocatePages(int pageCount,
int protection)
PageManagerPageManager.pageSize.allocatePages in class PageManagerpageCount - 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 pageCount)
PageManagerPageManager.allocatePages(int, int)freePages in class PageManageraddress - The memory address as returned from PageManager.allocatePages(int, int)pageCount - The number of pages to free.public void protectPages(long address,
int pageCount,
int protection)
PageManagerprotectPages in class PageManageraddress - The start of the memory region.pageCount - The number of pages to protect.protection - The protection mask.private static int w32prot(int p)