Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » All ObjectIds of Heap dump
All ObjectIds of Heap dump [message #10360] Thu, 14 May 2009 14:12 Go to next message
M.S.Alavi is currently offline M.S.AlaviFriend
Messages: 1
Registered: July 2009
Junior Member
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 06:57 Go to previous message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 164
Registered: July 2009
Senior Member
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: Thu Apr 25 14:21:15 GMT 2024

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

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

Back to the top