Skip to content

Instantly share code, notes, and snippets.

@fabrizioc1
Created August 30, 2011 13:40
Show Gist options
  • Save fabrizioc1/1180905 to your computer and use it in GitHub Desktop.
Save fabrizioc1/1180905 to your computer and use it in GitHub Desktop.
Show max JVM memory
public class ShowMemory
{
public static void main(String args[])
{
long maxBytes = Runtime.getRuntime().maxMemory();
System.out.println("Max memory: " + maxBytes / 1024 / 1024 + "M");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment