src/share/vm/code/codeCache.cpp

changeset 2764
dbccacb79c63
parent 2745
3f49d30f8184
child 2895
167b70ff3abc
equal deleted inserted replaced
2763:3a808be061ff 2764:dbccacb79c63
969 // This is called both with and without CodeCache_lock held so 969 // This is called both with and without CodeCache_lock held so
970 // handle both cases. 970 // handle both cases.
971 if (CodeCache_lock->owned_by_self()) { 971 if (CodeCache_lock->owned_by_self()) {
972 return _heap->largest_free_block(); 972 return _heap->largest_free_block();
973 } else { 973 } else {
974 // Avoid lock ordering problems with ttyLock.
975 ttyUnlocker ttyul;
976 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); 974 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
977 return _heap->largest_free_block(); 975 return _heap->largest_free_block();
978 } 976 }
979 } 977 }

mercurial