Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1975:d9310331a29c
7003860: G1: assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region) fails
Summary: Wrong assumption about expecting the current alloc region expected to be NULL in expand_and_allocate().
Reviewed-by: brutisso, ysr
author | tonyp |
---|---|
date | Thu, 02 Dec 2010 13:20:39 -0500 |
parents | fd1d227ef1b9 |
children | 016a3628c885 |
comparison
equal
deleted
inserted
replaced
1974:fd1d227ef1b9 | 1975:d9310331a29c |
---|---|
918 | 918 |
919 HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size, | 919 HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size, |
920 bool expect_null_cur_alloc_region) { | 920 bool expect_null_cur_alloc_region) { |
921 assert_at_safepoint(); | 921 assert_at_safepoint(); |
922 assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region, | 922 assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region, |
923 "The current alloc region should only be non-NULL if we're " | 923 err_msg("the current alloc region was unexpectedly found " |
924 "expecting it not to be NULL"); | 924 "to be non-NULL, cur alloc region: "PTR_FORMAT" " |
925 "expect_null_cur_alloc_region: %d word_size: "SIZE_FORMAT, | |
926 _cur_alloc_region, expect_null_cur_alloc_region, word_size)); | |
925 | 927 |
926 if (!isHumongous(word_size)) { | 928 if (!isHumongous(word_size)) { |
927 if (!expect_null_cur_alloc_region) { | 929 if (!expect_null_cur_alloc_region) { |
928 HeapRegion* cur_alloc_region = _cur_alloc_region; | 930 HeapRegion* cur_alloc_region = _cur_alloc_region; |
929 if (cur_alloc_region != NULL) { | 931 if (cur_alloc_region != NULL) { |
1595 } | 1597 } |
1596 expand(expand_bytes); | 1598 expand(expand_bytes); |
1597 assert(regions_accounted_for(), "Region leakage!"); | 1599 assert(regions_accounted_for(), "Region leakage!"); |
1598 | 1600 |
1599 return attempt_allocation_at_safepoint(word_size, | 1601 return attempt_allocation_at_safepoint(word_size, |
1600 true /* expect_null_cur_alloc_region */); | 1602 false /* expect_null_cur_alloc_region */); |
1601 } | 1603 } |
1602 | 1604 |
1603 size_t G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr) { | 1605 size_t G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr) { |
1604 size_t pre_used = 0; | 1606 size_t pre_used = 0; |
1605 size_t cleared_h_regions = 0; | 1607 size_t cleared_h_regions = 0; |