mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
7003860: G1: assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region) fails
Wrong assumption about expecting the current alloc region expected to be NULL in expand_and_allocate(). Reviewed-by: brutisso, ysr
This commit is contained in:
parent
1065281a98
commit
dcf8c40e3a
1 changed files with 5 additions and 3 deletions
|
@ -920,8 +920,10 @@ HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size,
|
|||
bool expect_null_cur_alloc_region) {
|
||||
assert_at_safepoint();
|
||||
assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region,
|
||||
"The current alloc region should only be non-NULL if we're "
|
||||
"expecting it not to be NULL");
|
||||
err_msg("the current alloc region was unexpectedly found "
|
||||
"to be non-NULL, cur alloc region: "PTR_FORMAT" "
|
||||
"expect_null_cur_alloc_region: %d word_size: "SIZE_FORMAT,
|
||||
_cur_alloc_region, expect_null_cur_alloc_region, word_size));
|
||||
|
||||
if (!isHumongous(word_size)) {
|
||||
if (!expect_null_cur_alloc_region) {
|
||||
|
@ -1597,7 +1599,7 @@ HeapWord* G1CollectedHeap::expand_and_allocate(size_t word_size) {
|
|||
assert(regions_accounted_for(), "Region leakage!");
|
||||
|
||||
return attempt_allocation_at_safepoint(word_size,
|
||||
true /* expect_null_cur_alloc_region */);
|
||||
false /* expect_null_cur_alloc_region */);
|
||||
}
|
||||
|
||||
size_t G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue