< prev index next >

src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.hpp

Print this page
rev 50554 : webrev.02


  93   // Returns the index of the page which contains the given address.
  94   uintptr_t  addr_to_page_index(char* addr) const;
  95   // Returns the address of the given page index.
  96   char*  page_start(size_t index) const;
  97 
  98   // Is the given page index the last page?
  99   bool is_last_page(size_t index) const { return index == (_committed.size() - 1); }
 100   // Is the given page index the first after last page?
 101   bool is_after_last_page(size_t index) const;
 102   // Is the last page only partially covered by this space?
 103   bool is_last_page_partial() const { return !is_aligned(_high_boundary, _page_size); }
 104   // Returns the end address of the given page bounded by the reserved space.
 105   char* bounded_end_addr(size_t end_page) const;
 106 
 107   // Returns true if the entire area is backed by committed memory.
 108   bool is_area_committed(size_t start_page, size_t size_in_pages) const;
 109   // Returns true if the entire area is not backed by committed memory.
 110   bool is_area_uncommitted(size_t start_page, size_t size_in_pages) const;
 111 
 112   void initialize_with_page_size(ReservedSpace rs, size_t used_size, size_t page_size);

 113  public:
 114 
 115   // Commit the given area of pages starting at start being size_in_pages large.
 116   // Returns true if the given area is zero filled upon completion.
 117   bool commit(size_t start_page, size_t size_in_pages);
 118 
 119   // Uncommit the given area of pages starting at start being size_in_pages large.
 120   void uncommit(size_t start_page, size_t size_in_pages);
 121 
 122   void pretouch(size_t start_page, size_t size_in_pages, WorkGang* pretouch_gang = NULL);
 123 
 124   // Initialize the given reserved space with the given base address and the size
 125   // actually used.
 126   // Prefer to commit in page_size chunks.
 127   G1PageBasedVirtualSpace(ReservedSpace rs, size_t used_size, size_t page_size);
 128 
 129   // Destruction
 130   ~G1PageBasedVirtualSpace();
 131 
 132   // Amount of reserved memory.




  93   // Returns the index of the page which contains the given address.
  94   uintptr_t  addr_to_page_index(char* addr) const;
  95   // Returns the address of the given page index.
  96   char*  page_start(size_t index) const;
  97 
  98   // Is the given page index the last page?
  99   bool is_last_page(size_t index) const { return index == (_committed.size() - 1); }
 100   // Is the given page index the first after last page?
 101   bool is_after_last_page(size_t index) const;
 102   // Is the last page only partially covered by this space?
 103   bool is_last_page_partial() const { return !is_aligned(_high_boundary, _page_size); }
 104   // Returns the end address of the given page bounded by the reserved space.
 105   char* bounded_end_addr(size_t end_page) const;
 106 
 107   // Returns true if the entire area is backed by committed memory.
 108   bool is_area_committed(size_t start_page, size_t size_in_pages) const;
 109   // Returns true if the entire area is not backed by committed memory.
 110   bool is_area_uncommitted(size_t start_page, size_t size_in_pages) const;
 111 
 112   void initialize_with_page_size(ReservedSpace rs, size_t used_size, size_t page_size);
 113   size_t get_nvdimm_size();
 114  public:
 115 
 116   // Commit the given area of pages starting at start being size_in_pages large.
 117   // Returns true if the given area is zero filled upon completion.
 118   bool commit(size_t start_page, size_t size_in_pages);
 119 
 120   // Uncommit the given area of pages starting at start being size_in_pages large.
 121   void uncommit(size_t start_page, size_t size_in_pages);
 122 
 123   void pretouch(size_t start_page, size_t size_in_pages, WorkGang* pretouch_gang = NULL);
 124 
 125   // Initialize the given reserved space with the given base address and the size
 126   // actually used.
 127   // Prefer to commit in page_size chunks.
 128   G1PageBasedVirtualSpace(ReservedSpace rs, size_t used_size, size_t page_size);
 129 
 130   // Destruction
 131   ~G1PageBasedVirtualSpace();
 132 
 133   // Amount of reserved memory.


< prev index next >