hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp
changeset 10671 431ff8629f97
parent 10670 4ea0e7d2ffbc
child 10677 370a8da2d63f
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp	Thu Sep 22 10:57:37 2011 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp	Fri Sep 23 16:07:49 2011 -0400
@@ -357,6 +357,11 @@
   static int GrainWords;
   static int CardsPerRegion;
 
+  static size_t align_up_to_region_byte_size(size_t sz) {
+    return (sz + (size_t) GrainBytes - 1) &
+                                      ~((1 << (size_t) LogOfHRGrainBytes) - 1);
+  }
+
   // It sets up the heap region size (GrainBytes / GrainWords), as
   // well as other related fields that are based on the heap region
   // size (LogOfHRGrainBytes / LogOfHRGrainWords /