< prev index next >

src/share/vm/gc/shenandoah/shenandoahHeap.inline.hpp

Print this page
rev 12670 : imported patch fixes.patch

*** 250,259 **** --- 250,267 ---- if (filler == NULL) { filler = allocate_memory(required, true); alloc_from_gclab = false; } + #ifdef ASSERT + // Checking that current Java thread does not hold Threads_lock when we get here. + // If that ever be the case, we'd deadlock in oom_during_evacuation. + if ((! Thread::current()->is_GC_task_thread()) && (! Thread::current()->is_ConcurrentGC_thread())) { + assert(! Threads_lock->owned_by_self(), "must not hold Threads_lock here"); + } + #endif + if (filler == NULL) { oom_during_evacuation(); // If this is a Java thread, it should have waited // until all GC threads are done, and then we // return the forwardee.
< prev index next >