src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp

Print this page

        

@@ -78,10 +78,15 @@
     _death_march_count = 0;
     set_alignment(_young_gen_alignment, intra_heap_alignment());
     set_alignment(_old_gen_alignment, intra_heap_alignment());
   }
 
+  // return the (conservative) maximum heap alignment
+  static size_t max_heap_alignment() {
+    return MAX2(os::max_page_size(), intra_heap_alignment());
+  }
+
   // For use by VM operations
   enum CollectionType {
     Scavenge,
     MarkSweep
   };

@@ -114,11 +119,11 @@
   size_t young_gen_alignment() const { return _young_gen_alignment; }
   size_t old_gen_alignment()  const { return _old_gen_alignment; }
 
   // The alignment used for eden and survivors within the young gen
   // and for boundary between young gen and old gen.
-  size_t intra_heap_alignment() const { return 64 * K; }
+  static size_t intra_heap_alignment() { return 64 * K; }
 
   size_t capacity() const;
   size_t used() const;
 
   // Return "true" if all generations have reached the