本文整理汇总了Java中sun.jvm.hotspot.memory.MemRegion类的典型用法代码示例。如果您正苦于以下问题:Java MemRegion类的具体用法?Java MemRegion怎么用?Java MemRegion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MemRegion类属于sun.jvm.hotspot.memory包,在下文中一共展示了MemRegion类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addLiveRegions
import sun.jvm.hotspot.memory.MemRegion; //导入依赖的package包/类
private void addLiveRegions(String name, List input, List output) {
Iterator itr = input.iterator();
while(itr.hasNext()) {
MemRegion reg = (MemRegion)itr.next();
Address top = reg.end();
Address bottom = reg.start();
if(Assert.ASSERTS_ENABLED) {
Assert.that(top != null, "top address in a live region should not be null");
}
if(Assert.ASSERTS_ENABLED) {
Assert.that(bottom != null, "bottom address in a live region should not be null");
}
output.add(top);
output.add(bottom);
}
}
示例2: printOn
import sun.jvm.hotspot.memory.MemRegion; //导入依赖的package包/类
@Override
public void printOn(PrintStream tty) {
MemRegion mr = reservedRegion();
tty.print("garbage-first heap");
tty.print(" [" + mr.start() + ", " + mr.end() + "]");
tty.println(" region size " + (HeapRegion.grainBytes() / 1024) + "K");
}
示例3: capacity
import sun.jvm.hotspot.memory.MemRegion; //导入依赖的package包/类
public long capacity() {
Address g1CommittedAddr = addr.addOffsetTo(g1CommittedFieldOffset);
MemRegion g1Committed = new MemRegion(g1CommittedAddr);
return g1Committed.byteSize();
}
示例4: getLiveRegions
import sun.jvm.hotspot.memory.MemRegion; //导入依赖的package包/类
@Override
public List getLiveRegions() {
List res = new ArrayList();
res.add(new MemRegion(bottom(), top()));
return res;
}