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