139
140 // allocate and initialize ("weak") refs processing support
141 virtual void ref_processor_init();
142 void set_ref_processor(ReferenceProcessor* rp) {
143 assert(_ref_processor == NULL, "clobbering existing _ref_processor");
144 _ref_processor = rp;
145 }
146
147 virtual Generation::Name kind() { return Generation::Other; }
148
149 // This properly belongs in the collector, but for now this
150 // will do.
151 virtual bool refs_discovery_is_atomic() const { return true; }
152 virtual bool refs_discovery_is_mt() const { return false; }
153
154 // Space inquiries (results in bytes)
155 size_t initial_size();
156 virtual size_t capacity() const = 0; // The maximum number of object bytes the
157 // generation can currently hold.
158 virtual size_t used() const = 0; // The number of used bytes in the gen.
159 virtual size_t free() const = 0; // The number of free bytes in the gen.
160
161 // Support for java.lang.Runtime.maxMemory(); see CollectedHeap.
162 // Returns the total number of bytes available in a generation
163 // for the allocation of objects.
164 virtual size_t max_capacity() const;
165
166 // If this is a young generation, the maximum number of bytes that can be
167 // allocated in this generation before a GC is triggered.
168 virtual size_t capacity_before_gc() const { return 0; }
169
170 // The largest number of contiguous free bytes in the generation,
171 // including expansion (Assumes called at a safepoint.)
172 virtual size_t contiguous_available() const = 0;
173 // The largest number of contiguous free bytes in this or any higher generation.
174 virtual size_t max_contiguous_available() const;
175
176 // Returns true if promotions of the specified amount are
177 // likely to succeed without a promotion failure.
178 // Promotion of the full amount is not guaranteed but
|
139
140 // allocate and initialize ("weak") refs processing support
141 virtual void ref_processor_init();
142 void set_ref_processor(ReferenceProcessor* rp) {
143 assert(_ref_processor == NULL, "clobbering existing _ref_processor");
144 _ref_processor = rp;
145 }
146
147 virtual Generation::Name kind() { return Generation::Other; }
148
149 // This properly belongs in the collector, but for now this
150 // will do.
151 virtual bool refs_discovery_is_atomic() const { return true; }
152 virtual bool refs_discovery_is_mt() const { return false; }
153
154 // Space inquiries (results in bytes)
155 size_t initial_size();
156 virtual size_t capacity() const = 0; // The maximum number of object bytes the
157 // generation can currently hold.
158 virtual size_t used() const = 0; // The number of used bytes in the gen.
159 virtual size_t used_stable() const; // The number of used bytes for memory monitoring tools.
160 virtual size_t free() const = 0; // The number of free bytes in the gen.
161
162 // Support for java.lang.Runtime.maxMemory(); see CollectedHeap.
163 // Returns the total number of bytes available in a generation
164 // for the allocation of objects.
165 virtual size_t max_capacity() const;
166
167 // If this is a young generation, the maximum number of bytes that can be
168 // allocated in this generation before a GC is triggered.
169 virtual size_t capacity_before_gc() const { return 0; }
170
171 // The largest number of contiguous free bytes in the generation,
172 // including expansion (Assumes called at a safepoint.)
173 virtual size_t contiguous_available() const = 0;
174 // The largest number of contiguous free bytes in this or any higher generation.
175 virtual size_t max_contiguous_available() const;
176
177 // Returns true if promotions of the specified amount are
178 // likely to succeed without a promotion failure.
179 // Promotion of the full amount is not guaranteed but
|