mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
7021322: assert(object_end <= top()) failed: Object crosses promotion LAB boundary
Pass the same object size value to both allocate and unallocate_object Reviewed-by: ysr, brutisso
This commit is contained in:
parent
75685a273a
commit
a4523cfc7f
3 changed files with 8 additions and 10 deletions
|
@ -102,17 +102,15 @@ void PSPromotionLAB::flush() {
|
|||
_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();
|
||||
assert(object_end <= top(), "Object crosses promotion LAB boundary");
|
||||
HeapWord* object_end = obj + obj_size;
|
||||
assert(object_end == top(), "Not matching last allocation");
|
||||
|
||||
if (object_end == top()) {
|
||||
set_top((HeapWord*)obj);
|
||||
return true;
|
||||
}
|
||||
set_top(obj);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue