src/share/vm/gc_implementation/g1/heapRegion.hpp
Print this page
rev 7084 : [mq]: demacro
@@ -184,12 +184,10 @@
virtual void clear(bool mangle_space);
HeapWord* block_start(const void* p);
HeapWord* block_start_const(const void* p) const;
- void prepare_for_compaction(CompactPoint* cp);
-
// Add offset table update.
virtual HeapWord* allocate(size_t word_size);
HeapWord* par_allocate(size_t word_size);
// MarkSweep support phase3
@@ -351,10 +349,25 @@
// Returns the object size for all valid block starts
// and the amount of unallocated words if called on top()
size_t block_size(const HeapWord* p) const;
+ // Functions for scan_and_forward support.
+ void prepare_for_compaction(CompactPoint* cp);
+
+ inline HeapWord* scan_limit() const {
+ return top();
+ }
+
+ inline bool scanned_block_is_obj(const HeapWord* addr) const {
+ return true; // Always true, since scan_limit is top
+ }
+
+ inline size_t scanned_block_size(const HeapWord* addr) const {
+ return HeapRegion::block_size(addr); // Avoid virtual call
+ }
+
inline HeapWord* par_allocate_no_bot_updates(size_t word_size);
inline HeapWord* allocate_no_bot_updates(size_t word_size);
// If this region is a member of a HeapRegionManager, the index in that
// sequence, otherwise -1.