CollectedHeap heap = VM.getVM().getUniverse().heap();
if (heap instanceof GenCollectedHeap) {
DefNewGeneration gen0 = (DefNewGeneration) ((GenCollectedHeap) heap).getGen(0);
if (gen0.eden().contains(obj.getHandle())) {
return InEden;
} else if (gen0.from().contains(obj.getHandle())) {
return InSurvivor;
}
Generation gen1 = ((GenCollectedHeap) heap).getGen(1);
if (gen1.isIn(obj.getHandle())) {
return InOld;