src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.cpp

Print this page
rev 2661 : 7021322: assert(object_end <= top()) failed: Object crosses promotion LAB boundary
Summary: Pass the same object size value to both allocate and unallocate_object
Reviewed-by: duke

@@ -100,19 +100,19 @@
   set_top(NULL);
 
   _state = flushed;
 }
 
-bool PSPromotionLAB::unallocate_object(oop obj) {
+bool PSPromotionLAB::unallocate_object(HeapWord* obj, size_t obj_size) {
   assert(Universe::heap()->is_in(obj), "Object outside heap");
 
   if (contains(obj)) {
-    HeapWord* object_end = (HeapWord*)obj + obj->size();
+    HeapWord* object_end = obj + obj_size;
     assert(object_end <= top(), "Object crosses promotion LAB boundary");
 
     if (object_end == top()) {
-      set_top((HeapWord*)obj);
+      set_top(obj);
       return true;
     }
   }
 
   return false;