Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Memory usage
Memory usage [message #1770099] Tue, 08 August 2017 10:32 Go to next message
Banafsheh A is currently offline Banafsheh AFriend
Messages: 262
Registered: July 2016
Senior Member
Hi,

How can I get memory usage of the program in Java?
Re: Memory usage [message #1770837 is a reply to message #1770099] Thu, 17 August 2017 13:59 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 195
Registered: October 2009
Location: UK
Senior Member

If you have the standalone jar just check your system resources (e.g. windows task manager) when you run it. If you are interested in more detailed information you need a performance library, e.g. Oracle's Mission Control[1]

Horacio
[1] http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html


Horacio Hoyos Rodriguez
Epsilon Committer
Research Assistant
University Of York
Re: Memory usage [message #1770839 is a reply to message #1770099] Thu, 17 August 2017 14:00 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 195
Registered: October 2009
Location: UK
Senior Member

dbl post

Horacio Hoyos Rodriguez
Epsilon Committer
Research Assistant
University Of York

[Updated on: Thu, 17 August 2017 14:06]

Report message to a moderator

Re: Memory usage [message #1771225 is a reply to message #1770839] Wed, 23 August 2017 06:20 Go to previous message
Eclipse UserFriend
by using Runtime.getRuntime.totalMemory() and Runtime.getRuntime.freeMemory() we can calculate how much space has been currently occupied by Java object or you say used memory in JVM as show in below code example of getting memory sizes in Java.
Previous Topic:Launch debugie in java.exe instead of javaw.exe
Next Topic:java.lang.UnsatisfiedLinkError: Unable to load library
Goto Forum:
  


Current Time: Fri May 25 19:00:59 GMT 2018

Powered by FUDForum. Page generated in 0.01673 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top