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: 180
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
EngD Student
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: 180
Registered: October 2009
Location: UK
Senior Member

dbl post

Horacio Hoyos Rodriguez
EngD Student
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
Priya Arrora is currently offline Priya ArroraFriend
Messages: 34
Registered: August 2017
Member
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:Eclipse good for Android Developement?
Next Topic:java.lang.UnsatisfiedLinkError: Unable to load library
Goto Forum:
  


Current Time: Sat Nov 25 09:54:22 GMT 2017

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

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