hotspot/src/share/vm/gc/shared/collectorPolicy.cpp
changeset 33212 906b3d079b13
parent 33105 294e48b4f704
child 35061 be6025ebffea
equal deleted inserted replaced
33211:966a1acb1243 33212:906b3d079b13
   150   bool result = _should_clear_all_soft_refs;
   150   bool result = _should_clear_all_soft_refs;
   151   set_should_clear_all_soft_refs(false);
   151   set_should_clear_all_soft_refs(false);
   152   return result;
   152   return result;
   153 }
   153 }
   154 
   154 
   155 GenRemSet* CollectorPolicy::create_rem_set(MemRegion whole_heap) {
   155 CardTableRS* CollectorPolicy::create_rem_set(MemRegion whole_heap) {
   156   return new CardTableRS(whole_heap);
   156   return new CardTableRS(whole_heap);
   157 }
   157 }
   158 
   158 
   159 void CollectorPolicy::cleared_all_soft_refs() {
   159 void CollectorPolicy::cleared_all_soft_refs() {
   160   // If near gc overhear limit, continue to clear SoftRefs.  SoftRefs may
   160   // If near gc overhear limit, continue to clear SoftRefs.  SoftRefs may
   171   // committed in os pages as well. Make sure they are entirely full (to
   171   // committed in os pages as well. Make sure they are entirely full (to
   172   // avoid partial page problems), e.g. if 512 bytes heap corresponds to 1
   172   // avoid partial page problems), e.g. if 512 bytes heap corresponds to 1
   173   // byte entry and the os page size is 4096, the maximum heap size should
   173   // byte entry and the os page size is 4096, the maximum heap size should
   174   // be 512*4096 = 2MB aligned.
   174   // be 512*4096 = 2MB aligned.
   175 
   175 
   176   size_t alignment = GenRemSet::max_alignment_constraint();
   176   size_t alignment = CardTableRS::ct_max_alignment_constraint();
   177 
   177 
   178   if (UseLargePages) {
   178   if (UseLargePages) {
   179       // In presence of large pages we have to make sure that our
   179       // In presence of large pages we have to make sure that our
   180       // alignment is large page aware.
   180       // alignment is large page aware.
   181       alignment = lcm(os::large_page_size(), alignment);
   181       alignment = lcm(os::large_page_size(), alignment);