< prev index next >
agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java
Print this page
@@ -32,11 +32,10 @@
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.types.*;
import sun.jvm.hotspot.utilities.*;
public class GenCollectedHeap extends SharedHeap {
- private static CIntegerField nGensField;
private static AddressField youngGenField;
private static AddressField oldGenField;
private static AddressField youngGenSpecField;
private static AddressField oldGenSpecField;
@@ -52,11 +51,10 @@
}
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("GenCollectedHeap");
- nGensField = type.getCIntegerField("_n_gens");
youngGenField = type.getAddressField("_young_gen");
oldGenField = type.getAddressField("_old_gen");
genFactory = new GenerationFactory();
@@ -68,11 +66,11 @@
public GenCollectedHeap(Address addr) {
super(addr);
}
public int nGens() {
- return (int) nGensField.getValue(addr);
+ return 2; // Young + Old
}
public Generation getGen(int i) {
if (Assert.ASSERTS_ENABLED) {
Assert.that((i == 0) || (i == 1), "Index " + i +
< prev index next >