test博客格式

git 

$ git config http.postBuffer 524288000

java

public class _21_TestMemory {
    public static void main(String[] args) {
        Vector vc = new Vector();
        for (int i = 1; i < 10; i++) {
            byte[] b = new byte[1024 * 1024];
            vc.add(b);
            System.out.println(i + "M is allocated");// (1)
        }
        System.out.println("Max memory : " + Runtime.getRuntime().maxMemory() / 1024 / 1024 + "M"); // (2)
    }
}

 

test

B   

H1

   
   
   

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章