< prev index next >
src/share/vm/memory/sharedHeap.cpp
Print this page
@@ -33,17 +33,14 @@
#include "runtime/fprofiler.hpp"
#include "runtime/java.hpp"
#include "utilities/copy.hpp"
#include "utilities/workgroup.hpp"
-SharedHeap* SharedHeap::_sh;
-
SharedHeap::SharedHeap() :
CollectedHeap(),
_workers(NULL)
{
- _sh = this; // ch is static, should be set only once.
if (UseConcMarkSweepGC || UseG1GC) {
_workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
/* are_GC_task_threads */true,
/* are_ConcurrentGC_threads */false);
if (_workers == NULL) {
@@ -52,17 +49,10 @@
_workers->initialize_workers();
}
}
}
-bool SharedHeap::heap_lock_held_for_gc() {
- Thread* t = Thread::current();
- return Heap_lock->owned_by_self()
- || ( (t->is_GC_task_thread() || t->is_VM_thread())
- && _thread_holds_heap_lock_for_gc);
-}
-
void SharedHeap::set_par_threads(uint t) {
assert(t == 0 || !UseSerialGC, "Cannot have parallel threads");
_n_par_threads = t;
}
< prev index next >