Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » finding the size of a single object (& more)
finding the size of a single object (& more) [message #2211] Sat, 28 June 2008 18:10 Go to next message
Eclipse UserFriend
Originally posted by: am.israel.chay.gmail.com

hi all,
1. can i find with this tool, the size of a single object?
2. i am calling to a dll via JNI. both the dll and the java take handreds
of MB.
can the Memory Analyzer show me how many MB the dll took, and how many the
java?
3. what is the effect of runnnig with Memory Analyzer on the application
performance?
4. is the Memory Analyzer useful only when the application crashes on "Out
of memory error", or it can show me the status of the application by
demand (like mini profiler)?

thanks,
yonatan
Re: finding the size of a single object (& more) [message #2241 is a reply to message #2211] Sun, 29 June 2008 11:51 Go to previous message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 113
Registered: July 2009
Senior Member
Hi Yonatan,

add 1. The Memory Analyzer gives you both sizes: the shallow size (e.g.
space consumed by the member attributes) and the retained size (e.g. the
space consumed by all objects that would be garbage collected if all
references to the object in question were removed).

add 2. The Memory Analyzer works with Java heap dumps. So there is not
much we can say about the memory consumption of native components such as
DLLs. What could be of interest are objects which cannot be garbage
collected because they are used/referenced by native components. These are
objects which are marked as Garbage Collection (GC) roots "JNI Local" and
"JNI Global".

add 3. As the Memory Analyzer works with heap dumps, the actual analysis
is offline. However, writing the heap dump takes some time. As a rule of
thumb, I am usually calculating with 1 GB heap per minute. Taking this
into account, one would not dump the heap regularly. But if you are
analyzing/investigating a specific problem, it often is worth dump the
heap of one node in a JEE cluster.

add 4. As I just mentioned, one can get a heap dump on out Of memory. It
really depends on your operation system and the Java version you are
using. Check our WIKI pages. The easiest thing for me is using Java 6 and
running JConsole to get a heap dump.


Andreas.
Previous Topic:missing tracing tab
Next Topic:OQL Preferences
Goto Forum:
  


Current Time: Thu Dec 18 11:42:01 GMT 2014

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

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