I am Ph.D. student in Computer Science at King Abdullah University of Science & Technology (KAUST).
This sample code will print the total and free memory at runtime to the console.
public class MemoryExp { public static void main(String[] args) { System.out.println("Total Memory"+Runtime.getRuntime().totalMemory()); System.out.println("Free Memory"+Runtime.getRuntime().freeMemory()); }}
Post a Comment
No comments:
Post a Comment