83 class Generation: public CHeapObj<mtGC> {
84 friend class VMStructs;
85 private:
86 jlong _time_of_last_gc; // time when last gc on this generation happened (ms)
87 MemRegion _prev_used_region; // for collectors that want to "remember" a value for
88 // used region at some specific point during collection.
89
90 GCMemoryManager* _gc_manager;
91
92 protected:
93 // Minimum and maximum addresses for memory reserved (not necessarily
94 // committed) for generation.
95 // Used by card marking code. Must not overlap with address ranges of
96 // other generations.
97 MemRegion _reserved;
98
99 // Memory area reserved for generation
100 VirtualSpace _virtual_space;
101
102 // ("Weak") Reference processing support
103 ReferenceProcessor* _ref_processor;
104
105 // Performance Counters
106 CollectorCounters* _gc_counters;
107
108 // Statistics for garbage collection
109 GCStats* _gc_stats;
110
111 // Initialize the generation.
112 Generation(ReservedSpace rs, size_t initial_byte_size);
113
114 // Apply "cl->do_oop" to (the address of) (exactly) all the ref fields in
115 // "sp" that point into younger generations.
116 // The iteration is only over objects allocated at the start of the
117 // iterations; objects allocated as a result of applying the closure are
118 // not included.
119 void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
120
121 public:
122 // The set of possible generation kinds.
|
83 class Generation: public CHeapObj<mtGC> {
84 friend class VMStructs;
85 private:
86 jlong _time_of_last_gc; // time when last gc on this generation happened (ms)
87 MemRegion _prev_used_region; // for collectors that want to "remember" a value for
88 // used region at some specific point during collection.
89
90 GCMemoryManager* _gc_manager;
91
92 protected:
93 // Minimum and maximum addresses for memory reserved (not necessarily
94 // committed) for generation.
95 // Used by card marking code. Must not overlap with address ranges of
96 // other generations.
97 MemRegion _reserved;
98
99 // Memory area reserved for generation
100 VirtualSpace _virtual_space;
101
102 // ("Weak") Reference processing support
103 SpanSubjectToDiscoveryClosure _span_discoverer;
104 ReferenceProcessor* _ref_processor;
105
106 // Performance Counters
107 CollectorCounters* _gc_counters;
108
109 // Statistics for garbage collection
110 GCStats* _gc_stats;
111
112 // Initialize the generation.
113 Generation(ReservedSpace rs, size_t initial_byte_size);
114
115 // Apply "cl->do_oop" to (the address of) (exactly) all the ref fields in
116 // "sp" that point into younger generations.
117 // The iteration is only over objects allocated at the start of the
118 // iterations; objects allocated as a result of applying the closure are
119 // not included.
120 void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
121
122 public:
123 // The set of possible generation kinds.
|