| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Foreign | |
| private int | |
| public static final int | PROT_EXEC
The memory should be executable |
| public static final int | PROT_READ
The memory should be readable |
| public static final int | PROT_WRITE
The memory should be writable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract long | Returns: The native address of the allocated memory.The number of pages to allocate. npages, int protection)Allocates native memory pages. |
| private long | |
| public abstract void | freePages(long
The memory address as returned from address, int allocatePagesThe number of pages to free. npages)Free pages allocated via |
| public static PageManager | |
| public final long | |
| public abstract void | protectPages(long
The start of the memory region. address, int The number of pages to protect. npages, int The protection mask. protection)Sets the protection mask on a memory region. |
| foreign | back to summary |
|---|---|
private final Foreign foreign
| |
| pageSize | back to summary |
|---|---|
| private int pageSize | |
| PROT_EXEC | back to summary |
|---|---|
| public static final int PROT_EXEC The memory should be executable | |
| PROT_READ | back to summary |
|---|---|
| public static final int PROT_READ The memory should be readable | |
| PROT_WRITE | back to summary |
|---|---|
| public static final int PROT_WRITE The memory should be writable | |
| PageManager | back to summary |
|---|---|
| public PageManager() | |
| allocatePages | back to summary |
|---|---|
| public abstract long allocatePages(int npages, int protection) Allocates native memory pages.
The memory allocated is aligned on a page boundary, and the size of the
allocated memory is
| |
| calculatePageSize | back to summary |
|---|---|
| private long calculatePageSize() | |
| freePages | back to summary |
|---|---|
| public abstract void freePages(long address, int npages) Free pages allocated via
| |
| getInstance | back to summary |
|---|---|
| public static PageManager getInstance() Gets the page manager for the current platform.
| |
| pageSize | back to summary |
|---|---|
| public final long pageSize() Gets the system page size.
| |
| protectPages | back to summary |
|---|---|
| public abstract void protectPages(long address, int npages, int protection) Sets the protection mask on a memory region.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final PageManager |
| Access | Constructor and Description |
|---|---|
| private |
| INSTANCE | back to summary |
|---|---|
| public static final PageManager INSTANCE | |
| SingletonHolder | back to summary |
|---|---|
| private SingletonHolder() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | allocatePages(int
The number of pages to allocate. npages, int protection)Implements abstract com. |
| public void | freePages(long
The memory address as returned from address, int allocatePagesThe number of pages to free. npages)Implements abstract com. allocatePages
|
| public void | protectPages(long
The start of the memory region. address, int The number of pages to protect. npages, int The protection mask. protection)Implements abstract com. |
| Unix | back to summary |
|---|---|
| pack-priv Unix() | |
| allocatePages | back to summary |
|---|---|
| public long allocatePages(int npages, int protection) Implements abstract com. Doc from com. Allocates native memory pages.
The memory allocated is aligned on a page boundary, and the size of the
allocated memory is
| |
| freePages | back to summary |
|---|---|
| public void freePages(long address, int npages) Implements abstract com. Doc from com. Free pages allocated via
| |
| protectPages | back to summary |
|---|---|
| public void protectPages(long address, int npages, int protection) Implements abstract com. Doc from com. Sets the protection mask on a memory region.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | allocatePages(int
The number of pages to allocate. pageCount, int protection)Implements abstract com. |
| public void | freePages(long
The memory address as returned from address, int allocatePagesThe number of pages to free. pageCount)Implements abstract com. allocatePages
|
| public void | protectPages(long
The start of the memory region. address, int The number of pages to protect. pageCount, int The protection mask. protection)Implements abstract com. |
| private static int |
| Windows | back to summary |
|---|---|
| public Windows() | |
| allocatePages | back to summary |
|---|---|
| public long allocatePages(int pageCount, int protection) Implements abstract com. Doc from com. Allocates native memory pages.
The memory allocated is aligned on a page boundary, and the size of the
allocated memory is
| |
| freePages | back to summary |
|---|---|
| public void freePages(long address, int pageCount) Implements abstract com. Doc from com. Free pages allocated via
| |
| protectPages | back to summary |
|---|---|
| public void protectPages(long address, int pageCount, int protection) Implements abstract com. Doc from com. Sets the protection mask on a memory region.
| |
| w32prot | back to summary |
|---|---|
| private static int w32prot(int p) | |