< prev index next >

src/hotspot/share/gc/z/zRelocationSetSelector.cpp

Print this page




 203   } else {
 204     _large.register_garbage_page(page);
 205   }
 206 }
 207 
 208 void ZRelocationSetSelector::select(ZRelocationSet* relocation_set) {
 209   // Select pages to relocate. The resulting relocation set will be
 210   // sorted such that medium pages comes first, followed by small
 211   // pages. Pages within each page group will be semi-sorted by live
 212   // bytes in ascending order. Relocating pages in this order allows
 213   // us to start reclaiming memory more quickly.
 214 
 215   // Select pages from each group, except large
 216   _medium.select();
 217   _small.select();
 218 
 219   // Populate relocation set
 220   relocation_set->populate(_medium.selected(), _medium.nselected(),
 221                            _small.selected(), _small.nselected());
 222 }










 203   } else {
 204     _large.register_garbage_page(page);
 205   }
 206 }
 207 
 208 void ZRelocationSetSelector::select(ZRelocationSet* relocation_set) {
 209   // Select pages to relocate. The resulting relocation set will be
 210   // sorted such that medium pages comes first, followed by small
 211   // pages. Pages within each page group will be semi-sorted by live
 212   // bytes in ascending order. Relocating pages in this order allows
 213   // us to start reclaiming memory more quickly.
 214 
 215   // Select pages from each group, except large
 216   _medium.select();
 217   _small.select();
 218 
 219   // Populate relocation set
 220   relocation_set->populate(_medium.selected(), _medium.nselected(),
 221                            _small.selected(), _small.nselected());
 222 }
 223 
 224 ZRelocationSetSelectorStats ZRelocationSetSelector::stats() const {
 225   ZRelocationSetSelectorStats stats;
 226   stats._small = _small.stats();
 227   stats._medium = _medium.stats();
 228   stats._large = _large.stats();
 229   return stats;
 230 }
< prev index next >