src/share/vm/memory/space.cpp
Print this page
rev 7084 : [mq]: demacro
*** 436,456 ****
allowed_deadspace_words = 0;
return false;
}
}
- #define block_is_always_obj(q) true
- #define obj_size(q) oop(q)->size()
- #define adjust_obj_size(s) s
-
- void CompactibleSpace::prepare_for_compaction(CompactPoint* cp) {
- SCAN_AND_FORWARD(cp, end, block_is_obj, block_size);
- }
-
- // Faster object search.
void ContiguousSpace::prepare_for_compaction(CompactPoint* cp) {
! SCAN_AND_FORWARD(cp, top, block_is_always_obj, obj_size);
}
void Space::adjust_pointers() {
// adjust all the interior pointers to point at the new locations of objects
// Used by MarkSweep::mark_sweep_phase3()
--- 436,447 ----
allowed_deadspace_words = 0;
return false;
}
}
void ContiguousSpace::prepare_for_compaction(CompactPoint* cp) {
! scan_and_forward(this, cp);
}
void Space::adjust_pointers() {
// adjust all the interior pointers to point at the new locations of objects
// Used by MarkSweep::mark_sweep_phase3()
*** 490,504 ****
// Check first is there is any work to do.
if (used() == 0) {
return; // Nothing to do.
}
! SCAN_AND_ADJUST_POINTERS(adjust_obj_size);
}
void CompactibleSpace::compact() {
! SCAN_AND_COMPACT(obj_size);
}
void Space::print_short() const { print_short_on(tty); }
void Space::print_short_on(outputStream* st) const {
--- 481,495 ----
// Check first is there is any work to do.
if (used() == 0) {
return; // Nothing to do.
}
! scan_and_adjust_pointers(this);
}
void CompactibleSpace::compact() {
! scan_and_compact(this);
}
void Space::print_short() const { print_short_on(tty); }
void Space::print_short_on(outputStream* st) const {