Skip to content

Instantly share code, notes, and snippets.

@nimdasys
Created April 2, 2015 21:45
Show Gist options
  • Save nimdasys/6f46529d14c5107ef18e to your computer and use it in GitHub Desktop.
Save nimdasys/6f46529d14c5107ef18e to your computer and use it in GitHub Desktop.
<cfset runtime = CreateObject("java","java.lang.Runtime").getRuntime() />
<cfset freeMemory = runtime.freeMemory() / 1024 / 1024 />
<cfset totalMemory = runtime.totalMemory() / 1024 / 1024 />
<cfset maxMemory = runtime.maxMemory() / 1024 / 1024 />
<cfoutput>
Free Allocated Memory: #Round(freeMemory)#mb<br>
Total Memory Allocated: #Round(totalMemory)#mb<br>
Max Memory Available to JVM: #Round(maxMemory)#mb<br>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment