77 return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, toSpaceField.getValue(addr)); 78 } 79 80 public long capacity() { return eden().capacity() + from().capacity(); /* to() is only used during scavenge */ } 81 public long used() { return eden().used() + from().used(); /* to() is only used during scavenge */ } 82 public long free() { return eden().free() + from().free(); /* to() is only used during scavenge */ } 83 public long contiguousAvailable() { return eden().free(); } 84 85 public String name() { 86 return "default new generation"; 87 } 88 89 public void spaceIterate(SpaceClosure blk, boolean usedOnly) { 90 blk.doSpace(eden()); 91 blk.doSpace(from()); 92 if (!usedOnly) { 93 blk.doSpace(to()); 94 } 95 } 96 97 public void printOn(PrintStream tty) { 98 tty.print(" eden"); 99 eden().printOn(tty); 100 tty.print("\n from"); 101 from().printOn(tty); 102 tty.print("\n to "); 103 to().printOn(tty); 104 } 105 } | 77 return (ContiguousSpace) VMObjectFactory.newObject(ContiguousSpace.class, toSpaceField.getValue(addr)); 78 } 79 80 public long capacity() { return eden().capacity() + from().capacity(); /* to() is only used during scavenge */ } 81 public long used() { return eden().used() + from().used(); /* to() is only used during scavenge */ } 82 public long free() { return eden().free() + from().free(); /* to() is only used during scavenge */ } 83 public long contiguousAvailable() { return eden().free(); } 84 85 public String name() { 86 return "default new generation"; 87 } 88 89 public void spaceIterate(SpaceClosure blk, boolean usedOnly) { 90 blk.doSpace(eden()); 91 blk.doSpace(from()); 92 if (!usedOnly) { 93 blk.doSpace(to()); 94 } 95 } 96 97 public void liveRegionsIterate(LiveRegionsClosure closure) { 98 closure.doLiveRegions(eden()); 99 closure.doLiveRegions(from()); 100 } 101 102 public void printOn(PrintStream tty) { 103 tty.print(" eden"); 104 eden().printOn(tty); 105 tty.print("\n from"); 106 from().printOn(tty); 107 tty.print("\n to "); 108 to().printOn(tty); 109 } 110 } |