< prev index next >

agent/src/share/classes/sun/jvm/hotspot/memory/GenCollectedHeap.java

Print this page

        

*** 32,42 **** 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; --- 32,41 ----
*** 52,62 **** } 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(); --- 51,60 ----
*** 68,78 **** public GenCollectedHeap(Address addr) { super(addr); } public int nGens() { ! return (int) nGensField.getValue(addr); } public Generation getGen(int i) { if (Assert.ASSERTS_ENABLED) { Assert.that((i == 0) || (i == 1), "Index " + i + --- 66,76 ---- public GenCollectedHeap(Address addr) { super(addr); } public int nGens() { ! return 2; // Young + Old } public Generation getGen(int i) { if (Assert.ASSERTS_ENABLED) { Assert.that((i == 0) || (i == 1), "Index " + i +
< prev index next >