A JVM without garbage collection, is it possible?
843829Jul 19 2009 — edited Jul 20 2009Hello,
I checked the JVM specifications here: [http://java.sun.com/docs/books/jvms/|http://java.sun.com/docs/books/jvms/]
As I understand it, the documents don't specify anything about garbage collection. Say, if I wanted to implement a new JVM for a new architecture, could I theoretically implement it fully without garbage collection? Would it still be a valid JVM?
Or if I decide to implement my own garbage collection, where do I find the restrictions/specifications about the gc implementation?
Edit: I found this in section 3.5.2 of the JVM specification, 2nd edition:
+"Heap storage for objects is reclaimed by an automatic storage management system (known as a garbage collector); objects are never explicitly deallocated. *The Java virtual machine assumes no particular type of automatic storage management system, and the storage management technique may be chosen according to the implementor's system requirements.*"+
I guess this implies that my own implementation of an automatic storage management system does not have to deallocate any object. This means, there may be a valid JVM without garbage collection, Is this right?
Edited by: Artun on Jul 19, 2009 3:21 AM