Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Threads and Synchronization and the fly likes immortal memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "immortal memory" Watch "immortal memory" New topic

immortal memory

medhaj hambi
Ranch Hand

Joined: Jun 04, 2008
Posts: 34
what happens when a particular thread wants to access an immortal memory area?
medhaj hambi
Ranch Hand

Joined: Jun 04, 2008
Posts: 34
it would be better if demostrated with a sample programme....kindly make it as fast as you cannn..!!!
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

Can you elaborate what are you referring to as immortal memory.
Memory allocation in java is left to the JVM and no program can pick and choose which memory area to use.

medhaj:kindly make it as fast as you cannn


apigee, a better way to API!
Henry Wong

Joined: Sep 28, 2004
Posts: 20380

"immortal memory" is defined by the Java real-time specification for objects that are "immortal" -- i.e. they are never garbage collected. IMHO, I don't see why special reference handling is needed for this. And I am assuming, during a GC cycle, references to immortal objects, just get ignored.

Regardless, I don't use a real-time JVM, so this is speculation. Hopefully, someone who has, can shed some light on this.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
medhaj hambi
Ranch Hand

Joined: Jun 04, 2008
Posts: 34
thanks for the prompt reply...theoretically i knew that...but i need to se that in a programme....ny ways...i apreciate that....
If we write a wait() method inside the synchronised block...will the execution of the current thread be stopped and will that be moved to the next waiting thread?
I agree. Here's the link:
subject: immortal memory
It's not a secret anymore!