• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reporting memory usage

 
Richard Robbins
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a test application that needs to report how much memory is being used by the JVM. Does anyone know how to access this information at runtime?
 
Junaid Bhatra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Runtime.getRuntime().totalMemory(); returns the total amount of memory in the JVM. Check the api for more details.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!