1 16 package org.apache.cocoon.webservices.memory; 17 18 24 public class Memory { 25 26 private static final Runtime runtime = Runtime.getRuntime(); 28 29 35 public static long getFreeMemory() { 36 return runtime.freeMemory(); 37 } 38 39 45 public static long getTotalMemory() { 46 return runtime.totalMemory(); 47 } 48 49 53 public static void invokeGC() { 54 runtime.gc(); 55 } 56 } 57 | Popular Tags |