@@ -427,11 +427,12 @@ return ZHeap::heap()->is_old(to_zaddress(p)); } #endif #if INCLUDE_SHENANDOAHGC if (UseShenandoahGC) { - return Universe::heap()->is_in(p); + ShenandoahHeap* sh = ShenandoahHeap::heap(); + return sh->mode()->is_generational() ? sh->is_in_old(p) : sh->is_in(p); } #endif #if INCLUDE_SERIALGC if (UseSerialGC) { return !SerialHeap::heap()->is_in_young(p);