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.
"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.
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?