7040068: CMS: Possibly unsafe initialization of BlockOffsetArrayUseUnallocatedBlock

BlockOffsetArrayUseUnallocatedBlock was intended to be turned off as part of BUG 6948538 but a code line in collectorPolicy.cpp actually kept it turned on.

Reviewed-by: jwilhelm, ysr
This commit is contained in:
Bengt Rutisson 2011-04-29 09:11:03 +02:00
parent c01be49675
commit fbffd24fc5
2 changed files with 1 additions and 3 deletions

View File

@ -265,8 +265,6 @@ void TwoGenerationCollectorPolicy::initialize_flags() {
MaxHeapSize = align_size_up(MaxHeapSize, max_alignment());
always_do_update_barrier = UseConcMarkSweepGC;
BlockOffsetArrayUseUnallocatedBlock =
BlockOffsetArrayUseUnallocatedBlock || ParallelGCThreads > 0;
// Check validity of heap flags
assert(OldSize % min_alignment() == 0, "old space alignment");

View File

@ -1824,7 +1824,7 @@ class CommandLineFlags {
develop(bool, VerifyBlockOffsetArray, false, \
"Do (expensive!) block offset array verification") \
\
product(bool, BlockOffsetArrayUseUnallocatedBlock, false, \
diagnostic(bool, BlockOffsetArrayUseUnallocatedBlock, false, \
"Maintain _unallocated_block in BlockOffsetArray" \
" (currently applicable only to CMS collector)") \
\