137 // Create a new tlab. All TLAB allocations must go through this.
138 // To allow more flexible TLAB allocations min_size specifies
139 // the minimum size needed, while requested_size is the requested
140 // size based on ergonomics. The actually allocated size will be
141 // returned in actual_size.
142 virtual HeapWord* allocate_new_tlab(size_t min_size,
143 size_t requested_size,
144 size_t* actual_size);
145
146 // Reinitialize tlabs before resuming mutators.
147 virtual void resize_all_tlabs();
148
149 // Raw memory allocation facilities
150 // The obj and array allocate methods are covers for these methods.
151 // mem_allocate() should never be
152 // called to allocate TLABs, only individual objects.
153 virtual HeapWord* mem_allocate(size_t size,
154 bool* gc_overhead_limit_was_exceeded) = 0;
155
156 // Filler object utilities.
157 static inline size_t filler_array_hdr_size();
158 static inline size_t filler_array_min_size();
159
160 DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);)
161 DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool zap = true);)
162
163 // Fill with a single array; caller must ensure filler_array_min_size() <=
164 // words <= filler_array_max_size().
165 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
166
167 // Fill with a single object (either an int array or a java.lang.Object).
168 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
169
170 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
171
172 // Verification functions
173 debug_only(static void check_for_valid_allocation_state();)
174
175 public:
176 enum Name {
177 None,
|
137 // Create a new tlab. All TLAB allocations must go through this.
138 // To allow more flexible TLAB allocations min_size specifies
139 // the minimum size needed, while requested_size is the requested
140 // size based on ergonomics. The actually allocated size will be
141 // returned in actual_size.
142 virtual HeapWord* allocate_new_tlab(size_t min_size,
143 size_t requested_size,
144 size_t* actual_size);
145
146 // Reinitialize tlabs before resuming mutators.
147 virtual void resize_all_tlabs();
148
149 // Raw memory allocation facilities
150 // The obj and array allocate methods are covers for these methods.
151 // mem_allocate() should never be
152 // called to allocate TLABs, only individual objects.
153 virtual HeapWord* mem_allocate(size_t size,
154 bool* gc_overhead_limit_was_exceeded) = 0;
155
156 // Filler object utilities.
157 static inline size_t filler_array_min_size();
158
159 DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);)
160 DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool zap = true);)
161
162 // Fill with a single array; caller must ensure filler_array_min_size() <=
163 // words <= filler_array_max_size().
164 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
165
166 // Fill with a single object (either an int array or a java.lang.Object).
167 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
168
169 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
170
171 // Verification functions
172 debug_only(static void check_for_valid_allocation_state();)
173
174 public:
175 enum Name {
176 None,
|