Skip to main content



      Home
Home » Archived » Memory Analyzer (MAT) » All ObjectIds of Heap dump
All ObjectIds of Heap dump [message #10360] Thu, 14 May 2009 10:12 Go to next message
Eclipse UserFriend
I want to know how I can get all the object IDs of all objects in the
snapshot.
any Idea?

Regards,
Mohammad
Re: All ObjectIds of Heap dump [message #10393 is a reply to message #10360] Fri, 15 May 2009 02:57 Go to previous message
Eclipse UserFriend
Hi,

Programatically or somehow in the GUI? Programatically you can do this:

You can use the ISnapshot.getSnapshotInfo().getNumberOfObjects() to get
the count of objects. The IDs we give to the objetcts start from 0 and are
sequential - so you just have to iterate from 0 to "count"

If you want to see the object addresses, you can use the in your iteration.
ISnapshot.mapIdToAddress(int objectId)

Just a note - using the object IDs in your queries will work much faster
that using the object addresses.

Hope this helps.

Krum


M.S.Alavi wrote:

> I want to know how I can get all the object IDs of all objects in the
> snapshot.
> any Idea?

> Regards,
> Mohammad
Previous Topic:hprof stacktrace info support
Next Topic:Analyser 'loosing' over half of the used memory
Goto Forum:
  


Current Time: Sun Apr 20 16:47:49 EDT 2025

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

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

Back to the top