jvm

来源:互联网 发布:软件开发网上兼职 编辑:程序博客网 时间:2024/06/05 13:39
package com.npnets.demo;import java.io.IOException;public class FreeMoney {    public static void main(String[] args) throws IOException {        //Process pro = Runtime.getRuntime().exec("");        long jvm = Runtime.getRuntime().freeMemory();        Runtime.getRuntime().gc();        Runtime.getRuntime().maxMemory();        System.out.println(jvm);        System.out.println(Runtime.getRuntime().maxMemory());    }}
0 0