• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locating An Instance from Its Physical Address

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a native memory scanning tool in Windows that let me identify which viirtual address of a process contains the data I needed. I used it on java.exe and found the the address of my target data in the jvm process. However, is it possible to figure which instance is related to that particular address from, say, the heap dump? So far, I never found anything related to address in the heap dump of tools like VisualVM.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, heap dumps do not contain memory addresses, they contain only object id info which is needed to reestablish the references.

Besides, objects move around in memory every time a GC happens so knowing an object's memory address is not that helpful.
 
Andrei Matyas
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes indeed the real memory address of un object is meaningless because the GC can move objects around in memory.
Anyway, for fun, take a look at the Unsafe class maybe this may do what you need.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic