Class PageManager.Windows

java.lang.Object
com.kenai.jffi.PageManager
com.kenai.jffi.PageManager.Windows
Enclosing class:
PageManager

static final class PageManager.Windows extends PageManager
  • Constructor Details

    • Windows

      public Windows()
  • Method Details

    • allocatePages

      public long allocatePages(int pageCount, int protection)
      Description copied from class: PageManager
      Allocates native memory pages. The memory allocated is aligned on a page boundary, and the size of the allocated memory is npages * PageManager.pageSize.
      Specified by:
      allocatePages in class PageManager
      Parameters:
      pageCount - 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.
      Returns:
      The native address of the allocated memory.
    • freePages

      public void freePages(long address, int pageCount)
      Description copied from class: PageManager
      Free pages allocated via PageManager.allocatePages(int, int)
      Specified by:
      freePages in class PageManager
      Parameters:
      address - The memory address as returned from PageManager.allocatePages(int, int)
      pageCount - The number of pages to free.
    • protectPages

      public void protectPages(long address, int pageCount, int protection)
      Description copied from class: PageManager
      Sets the protection mask on a memory region.
      Specified by:
      protectPages in class PageManager
      Parameters:
      address - The start of the memory region.
      pageCount - The number of pages to protect.
      protection - The protection mask.
    • w32prot

      private static int w32prot(int p)