Finding Memory Address
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RV_RamaKrishna
Posted On:   Thursday, October 13, 2005 01:15 PM


Hai

Anybdy cld plz let me knw how to find out the memory address where the java objects are stored?

Say String str1=new String("Hello");

I wanna knw where this str1 stores.Is it possible in java.

Thanks in advance.

Regards,
RK

Re: Finding Memory Address

Posted By:   Simon_Ablett  
Posted On:   Monday, October 17, 2005 10:07 AM

Java doesn't allow you access to memory addresses as it doesn't have any concept of pointers. If you managed to determine the address what what would you want to achieve?

Regards.

Re: Finding Memory Address

Posted By:   Anonymous  
Posted On:   Thursday, October 13, 2005 11:31 PM

You may want to take a look at undocumented sun.misc.Unsafe in JDK 1.4

Re: Finding Memory Address

Posted By:   Almagest_FUTT  
Posted On:   Thursday, October 13, 2005 04:01 PM

It may be the value returned by System.identityHashCode(Object), but it's not bound to.
About | Sitemap | Contact