< prev index next >
src/share/vm/memory/sharedHeap.cpp
Print this page
*** 33,49 ****
#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) {
--- 33,46 ----
*** 52,68 ****
_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;
}
--- 49,58 ----
< prev index next >