From cd72a3fa412a5d1f7ee69977105de823c9db0d4b Mon Sep 17 00:00:00 2001 From: brutisso Date: Fri, 29 Apr 2011 09:11:03 +0200 Subject: [PATCH] 7040068: CMS: Possibly unsafe initialization of BlockOffsetArrayUseUnallocatedBlock Summary: 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 --- src/share/vm/memory/collectorPolicy.cpp | 2 -- src/share/vm/runtime/globals.hpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp index 61efdd80f..7ad2bebaf 100644 --- a/src/share/vm/memory/collectorPolicy.cpp +++ b/src/share/vm/memory/collectorPolicy.cpp @@ -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"); diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp index c16f88660..59f8fb95a 100644 --- a/src/share/vm/runtime/globals.hpp +++ b/src/share/vm/runtime/globals.hpp @@ -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)") \ \ -- GitLab