Changes between Version 1 and Version 2 of jazz/11-02-27


Ignore:
Timestamp:
Feb 27, 2011, 11:14:46 PM (14 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/11-02-27

    v1 v2  
    6767vm.swappiness = 0
    6868}}}
     69 * [http://www.javaworld.com.tw/jute/post/view?bid=29&id=9589&tpg=1&ppg=1&sty=3&age=-1 20.如何取得記憶體的統計資料(memory statistics)?] 介紹如何寫 Java 記憶體
     70{{{
     71public class MemoryStats{
     72    public static void main(String args[]){
     73        long totalMem = Runtime.getRuntime().totalMemory();
     74        long freeMem = Runtime.getRuntime().freeMemory();
     75        System.out.println("Total memory"+ totalMem);
     76        System.out.println("Free memory" + freeMem);
     77    }
     78}
     79}}}