diff src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 10334:7c5a1b62f53d

8014971: Minor code cleanup of the freelist management Reviewed-by: jwilhelm, jmasa, tschatzl
author brutisso
date Wed, 22 May 2013 08:04:58 +0200
parents 28e53b8db94f
children 71180a6e5080
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Tue May 21 11:30:14 2013 +0200
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Wed May 22 08:04:58 2013 +0200
@@ -153,8 +153,6 @@
       _indexedFreeListParLocks[i] = new Mutex(Mutex::leaf - 1, // == ExpandHeap_lock - 1
                                               "a freelist par lock",
                                               true);
-      if (_indexedFreeListParLocks[i] == NULL)
-        vm_exit_during_initialization("Could not allocate a par lock");
       DEBUG_ONLY(
         _indexedFreeList[i].set_protecting_lock(_indexedFreeListParLocks[i]);
       )
@@ -1763,7 +1761,7 @@
   }
   ec->set_size(size);
   debug_only(ec->mangleFreed(size));
-  if (size < SmallForDictionary) {
+  if (size < SmallForDictionary && ParallelGCThreads != 0) {
     lock = _indexedFreeListParLocks[size];
   }
   MutexLockerEx x(lock, Mutex::_no_safepoint_check_flag);