diff src/share/vm/memory/blockOffsetTable.hpp @ 301:387a62b4be60

6728478: Assertion at parallel promotion from young to old generation Summary: The fix avoids a call to address_for_index() in this particular situation where it is not known if the passed index is in bounds. Reviewed-by: tonyp
author jmasa
date Wed, 20 Aug 2008 23:05:04 -0700
parents a61af66fc99e
children 9ee9cf798b59 2564c620fa42
line wrap: on
line diff
--- a/src/share/vm/memory/blockOffsetTable.hpp	Wed Aug 20 15:41:36 2008 -0700
+++ b/src/share/vm/memory/blockOffsetTable.hpp	Wed Aug 20 23:05:04 2008 -0700
@@ -199,6 +199,12 @@
   // "index" in "_offset_array".
   HeapWord* address_for_index(size_t index) const;
 
+  // Return the address "p" incremented by the size of
+  // a region.  This method does not align the address
+  // returned to the start of a region.  It is a simple
+  // primitive.
+  HeapWord* inc_by_region_size(HeapWord* p) const { return p + N_words; }
+
   // Shared space support
   void serialize(SerializeOopClosure* soc, HeapWord* start, HeapWord* end);
 };