1.1 --- a/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Fri Apr 09 13:08:34 2010 -0400 1.2 +++ b/src/share/vm/gc_implementation/shared/vmGCOperations.hpp Tue Apr 13 13:52:10 2010 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 2005-2010 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -89,8 +89,19 @@ 1.11 if (full) { 1.12 _full_gc_count_before = full_gc_count_before; 1.13 } 1.14 + // In ParallelScavengeHeap::mem_allocate() collections can be 1.15 + // executed within a loop and _all_soft_refs_clear can be set 1.16 + // true after they have been cleared by a collection and another 1.17 + // collection started so that _all_soft_refs_clear can be true 1.18 + // when this collection is started. Don't assert that 1.19 + // _all_soft_refs_clear have to be false here even though 1.20 + // mutators have run. Soft refs will be cleared again in this 1.21 + // collection. 1.22 } 1.23 - ~VM_GC_Operation() {} 1.24 + ~VM_GC_Operation() { 1.25 + CollectedHeap* ch = Universe::heap(); 1.26 + ch->collector_policy()->set_all_soft_refs_clear(false); 1.27 + } 1.28 1.29 // Acquire the reference synchronization lock 1.30 virtual bool doit_prologue();