1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Thu May 12 19:39:58 2011 -0700 1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp Tue May 03 10:30:34 2011 -0700 1.3 @@ -339,6 +339,21 @@ 1.4 return false; 1.5 } 1.6 1.7 +bool ParallelScavengeHeap::is_scavengable(const void* addr) { 1.8 + return is_in_young((oop)addr); 1.9 +} 1.10 + 1.11 +#ifdef ASSERT 1.12 +// Don't implement this by using is_in_young(). This method is used 1.13 +// in some cases to check that is_in_young() is correct. 1.14 +bool ParallelScavengeHeap::is_in_partial_collection(const void *p) { 1.15 + assert(is_in_reserved(p) || p == NULL, 1.16 + "Does not work if address is non-null and outside of the heap"); 1.17 + // The order of the generations is perm (low addr), old, young (high addr) 1.18 + return p >= old_gen()->reserved().end(); 1.19 +} 1.20 +#endif 1.21 + 1.22 // There are two levels of allocation policy here. 1.23 // 1.24 // When an allocation request fails, the requesting thread must invoke a VM