What is the purpose of Immortal Memory?
Immortal memory is a non-garbage-collected area of memory. Once an object is allocated from immortal memory, the memory used by that object will never, in principle, be reclaimed. The primary use for immortal memory is so that activities can avoid dynamic allocation by statically allocating all the memory they need ahead of time, and managing it themselves. Furthermore, the RTSJ requires that all static data and code of a class be allocated in Immortal Memory.
Immortal memory is a non-garbage-collected area of memory. Once an object is allocated from immortal memory, the memory used by that object will never, in principle, be reclaimed. The primary use for immortal memory is the following: activities can avoid dynamic allocation by statically allocating all the memory they need ahead of time, and managing it themselves. Furthermore, the RTSJ requires that all static data and code of a class be allocated in immortal memory.