Skip to content

Commit

Permalink
Use when sanity checking
Browse files Browse the repository at this point in the history
  • Loading branch information
earthling-amzn committed Aug 23, 2024
1 parent 19d9c58 commit 67aabca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ inline bool ShenandoahHeap::is_in_active_generation(oop obj) const {
return false;
}

assert(is_in(obj), "only check if is in active generation for objects (" PTR_FORMAT ") in heap", p2i(obj));
assert(is_in_reserved(obj), "only check if is in active generation for objects (" PTR_FORMAT ") in heap", p2i(obj));
assert(gen->is_old() || gen->is_young() || gen->is_global(),
"Active generation must be old, young, or global");

Expand All @@ -386,11 +386,11 @@ inline bool ShenandoahHeap::is_in_active_generation(oop obj) const {
}

inline bool ShenandoahHeap::is_in_young(const void* p) const {
return is_in(p) && (_affiliations[heap_region_index_containing(p)] == ShenandoahAffiliation::YOUNG_GENERATION);
return is_in_reserved(p) && (_affiliations[heap_region_index_containing(p)] == ShenandoahAffiliation::YOUNG_GENERATION);
}

inline bool ShenandoahHeap::is_in_old(const void* p) const {
return is_in(p) && (_affiliations[heap_region_index_containing(p)] == ShenandoahAffiliation::OLD_GENERATION);
return is_in_reserved(p) && (_affiliations[heap_region_index_containing(p)] == ShenandoahAffiliation::OLD_GENERATION);
}

inline bool ShenandoahHeap::is_old(oop obj) const {
Expand Down

0 comments on commit 67aabca

Please sign in to comment.