Mercurial > hg > truffle
comparison src/share/vm/memory/space.cpp @ 4708:3c648b9ad052
7121373: Clean up CollectedHeap::is_in
Summary: Fixed G1CollectedHeap::is_in, added tests, cleaned up comments and made Space::is_in pure virtual.
Reviewed-by: brutisso, tonyp, jcoomes
author | stefank |
---|---|
date | Wed, 14 Dec 2011 12:15:26 +0100 |
parents | fc2b798ab316 |
children | b632e80fc9dc |
comparison
equal
deleted
inserted
replaced
4132:6d7d0790074d | 4708:3c648b9ad052 |
---|---|
302 set_top(bottom()); | 302 set_top(bottom()); |
303 set_saved_mark(); | 303 set_saved_mark(); |
304 CompactibleSpace::clear(mangle_space); | 304 CompactibleSpace::clear(mangle_space); |
305 } | 305 } |
306 | 306 |
307 bool Space::is_in(const void* p) const { | |
308 HeapWord* b = block_start_const(p); | |
309 return b != NULL && block_is_obj(b); | |
310 } | |
311 | |
312 bool ContiguousSpace::is_in(const void* p) const { | 307 bool ContiguousSpace::is_in(const void* p) const { |
313 return _bottom <= p && p < _top; | 308 return _bottom <= p && p < _top; |
314 } | 309 } |
315 | 310 |
316 bool ContiguousSpace::is_free_block(const HeapWord* p) const { | 311 bool ContiguousSpace::is_free_block(const HeapWord* p) const { |