178 virtual void safe_object_iterate(ObjectClosure* blk) = 0;
179
180 // Create and return a new dirty card to oop closure. Can be
181 // overridden to return the appropriate type of closure
182 // depending on the type of space in which the closure will
183 // operate. ResourceArea allocated.
184 virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
185 CardTableModRefBS::PrecisionStyle precision,
186 HeapWord* boundary = NULL);
187
188 // If "p" is in the space, returns the address of the start of the
189 // "block" that contains "p". We say "block" instead of "object" since
190 // some heaps may not pack objects densely; a chunk may either be an
191 // object or a non-object. If "p" is not in the space, return NULL.
192 virtual HeapWord* block_start_const(const void* p) const = 0;
193
194 // The non-const version may have benevolent side effects on the data
195 // structure supporting these calls, possibly speeding up future calls.
196 // The default implementation, however, is simply to call the const
197 // version.
198 inline virtual HeapWord* block_start(const void* p);
199
200 // Requires "addr" to be the start of a chunk, and returns its size.
201 // "addr + size" is required to be the start of a new chunk, or the end
202 // of the active area of the heap.
203 virtual size_t block_size(const HeapWord* addr) const = 0;
204
205 // Requires "addr" to be the start of a block, and returns "TRUE" iff
206 // the block is an object.
207 virtual bool block_is_obj(const HeapWord* addr) const = 0;
208
209 // Requires "addr" to be the start of a block, and returns "TRUE" iff
210 // the block is an object and the object is alive.
211 virtual bool obj_is_alive(const HeapWord* addr) const;
212
213 // Allocation (return NULL if full). Assumes the caller has established
214 // mutually exclusive access to the space.
215 virtual HeapWord* allocate(size_t word_size) = 0;
216
217 // Allocation (return NULL if full). Enforces mutual exclusion internally.
218 virtual HeapWord* par_allocate(size_t word_size) = 0;
|
178 virtual void safe_object_iterate(ObjectClosure* blk) = 0;
179
180 // Create and return a new dirty card to oop closure. Can be
181 // overridden to return the appropriate type of closure
182 // depending on the type of space in which the closure will
183 // operate. ResourceArea allocated.
184 virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
185 CardTableModRefBS::PrecisionStyle precision,
186 HeapWord* boundary = NULL);
187
188 // If "p" is in the space, returns the address of the start of the
189 // "block" that contains "p". We say "block" instead of "object" since
190 // some heaps may not pack objects densely; a chunk may either be an
191 // object or a non-object. If "p" is not in the space, return NULL.
192 virtual HeapWord* block_start_const(const void* p) const = 0;
193
194 // The non-const version may have benevolent side effects on the data
195 // structure supporting these calls, possibly speeding up future calls.
196 // The default implementation, however, is simply to call the const
197 // version.
198 virtual HeapWord* block_start(const void* p);
199
200 // Requires "addr" to be the start of a chunk, and returns its size.
201 // "addr + size" is required to be the start of a new chunk, or the end
202 // of the active area of the heap.
203 virtual size_t block_size(const HeapWord* addr) const = 0;
204
205 // Requires "addr" to be the start of a block, and returns "TRUE" iff
206 // the block is an object.
207 virtual bool block_is_obj(const HeapWord* addr) const = 0;
208
209 // Requires "addr" to be the start of a block, and returns "TRUE" iff
210 // the block is an object and the object is alive.
211 virtual bool obj_is_alive(const HeapWord* addr) const;
212
213 // Allocation (return NULL if full). Assumes the caller has established
214 // mutually exclusive access to the space.
215 virtual HeapWord* allocate(size_t word_size) = 0;
216
217 // Allocation (return NULL if full). Enforces mutual exclusion internally.
218 virtual HeapWord* par_allocate(size_t word_size) = 0;
|