175 // Insert the given region list into the global free region list.
176 void insert_list_into_free_list(FreeRegionList* list) {
177 _free_list.add_ordered(list);
178 }
179
180 // Allocate a free region with specific node index. If fails allocate with next node index.
181 virtual HeapRegion* allocate_free_region(HeapRegionType type, uint requested_node_index);
182
183 inline void allocate_free_regions_starting_at(uint first, uint num_regions);
184
185 // Remove all regions from the free list.
186 void remove_all_free_regions() {
187 _free_list.remove_all();
188 }
189
190 // Return the number of committed free regions in the heap.
191 uint num_free_regions() const {
192 return _free_list.length();
193 }
194
195 size_t total_free_bytes() const {
196 return num_free_regions() * HeapRegion::GrainBytes;
197 }
198
199 // Return the number of available (uncommitted) regions.
200 uint available() const { return max_length() - length(); }
201
202 // Return the number of regions that have been committed in the heap.
203 uint length() const { return _num_committed; }
204
205 // Return the maximum number of regions in the heap.
206 uint max_length() const { return (uint)_regions.length(); }
207
208 // Return maximum number of regions that heap can expand to.
209 virtual uint max_expandable_length() const { return (uint)_regions.length(); }
210
211 MemoryUsage get_auxiliary_data_memory_usage() const;
212
213 MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); }
214
|
175 // Insert the given region list into the global free region list.
176 void insert_list_into_free_list(FreeRegionList* list) {
177 _free_list.add_ordered(list);
178 }
179
180 // Allocate a free region with specific node index. If fails allocate with next node index.
181 virtual HeapRegion* allocate_free_region(HeapRegionType type, uint requested_node_index);
182
183 inline void allocate_free_regions_starting_at(uint first, uint num_regions);
184
185 // Remove all regions from the free list.
186 void remove_all_free_regions() {
187 _free_list.remove_all();
188 }
189
190 // Return the number of committed free regions in the heap.
191 uint num_free_regions() const {
192 return _free_list.length();
193 }
194
195 uint num_free_regions(uint node_index) const {
196 return _free_list.length(node_index);
197 }
198
199 size_t total_free_bytes() const {
200 return num_free_regions() * HeapRegion::GrainBytes;
201 }
202
203 // Return the number of available (uncommitted) regions.
204 uint available() const { return max_length() - length(); }
205
206 // Return the number of regions that have been committed in the heap.
207 uint length() const { return _num_committed; }
208
209 // Return the maximum number of regions in the heap.
210 uint max_length() const { return (uint)_regions.length(); }
211
212 // Return maximum number of regions that heap can expand to.
213 virtual uint max_expandable_length() const { return (uint)_regions.length(); }
214
215 MemoryUsage get_auxiliary_data_memory_usage() const;
216
217 MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); }
218
|