74 GCH_PS_CodeCache_oops_do,
75 GCH_PS_younger_gens,
76 // Leave this one last.
77 GCH_PS_NumElements
78 };
79
80 GenCollectedHeap::GenCollectedHeap(GenCollectorPolicy *policy) :
81 SharedHeap(),
82 _rem_set(NULL),
83 _gen_policy(policy),
84 _process_strong_tasks(new SubTasksDone(GCH_PS_NumElements)),
85 _full_collections_completed(0)
86 {
87 assert(policy != NULL, "Sanity check");
88 if (UseConcMarkSweepGC) {
89 _workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
90 /* are_GC_task_threads */true,
91 /* are_ConcurrentGC_threads */false);
92 _workers->initialize_workers();
93 } else {
94 // Serial GC does not use workers
95 _workers = NULL;
96 }
97 }
98
99 jint GenCollectedHeap::initialize() {
100 CollectedHeap::pre_initialize();
101
102 _n_gens = gen_policy()->number_of_generations();
103 assert(_n_gens == 2, "There is no support for more than two generations");
104
105 // While there are no constraints in the GC code that HeapWordSize
106 // be any particular value, there are multiple other areas in the
107 // system which believe this to be true (e.g. oop->object_size in some
108 // cases incorrectly returns the size in wordSize units rather than
109 // HeapWordSize).
110 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");
111
112 // Allocate space for the heap.
113
114 char* heap_address;
|
74 GCH_PS_CodeCache_oops_do,
75 GCH_PS_younger_gens,
76 // Leave this one last.
77 GCH_PS_NumElements
78 };
79
80 GenCollectedHeap::GenCollectedHeap(GenCollectorPolicy *policy) :
81 SharedHeap(),
82 _rem_set(NULL),
83 _gen_policy(policy),
84 _process_strong_tasks(new SubTasksDone(GCH_PS_NumElements)),
85 _full_collections_completed(0)
86 {
87 assert(policy != NULL, "Sanity check");
88 if (UseConcMarkSweepGC) {
89 _workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
90 /* are_GC_task_threads */true,
91 /* are_ConcurrentGC_threads */false);
92 _workers->initialize_workers();
93 } else {
94 // Serial GC does not use workers.
95 _workers = NULL;
96 }
97 }
98
99 jint GenCollectedHeap::initialize() {
100 CollectedHeap::pre_initialize();
101
102 _n_gens = gen_policy()->number_of_generations();
103 assert(_n_gens == 2, "There is no support for more than two generations");
104
105 // While there are no constraints in the GC code that HeapWordSize
106 // be any particular value, there are multiple other areas in the
107 // system which believe this to be true (e.g. oop->object_size in some
108 // cases incorrectly returns the size in wordSize units rather than
109 // HeapWordSize).
110 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");
111
112 // Allocate space for the heap.
113
114 char* heap_address;
|