Live data from Hacker News

Eclipse OpenJ9 – Open-source JVM

github.com

21–30 of 105 posts

Re: Eclipse OpenJ9 – Open-source JVM

#22
post #5

So is this OpenJDK-derived? If so, too bad, I've been hoping for a truly independent implementation. If not, does it pass the TCK?

Ex-J9 engineer here, J9 was built completely in a clean-room. It does pass the TCK tests.

I was intern'd at IBM Toronto Lab about 10+ yrs ago to add instruction sets for this compiler/JVM. It was fucking awesome experience back then!

Re: Eclipse OpenJ9 – Open-source JVM

#23

Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?

Why would you want to add a delete keyword? Are you trying to add explicit memory management to simplify the work of the garbage collector?

Re: Eclipse OpenJ9 – Open-source JVM

#24

Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?

Java does memory recovery strictly by garbage collection. To delete an object remove all references to that object and wait.

A "delete now" operation imposes requirements on implementations that are not strictly required.

Any advantages gained from destructors can be realized via explicit cleanup methods and (as a hedge against mis-use) state checking for initialized and destroyed objects. A delete operation also adds risk that an object that has been deleted may be referenced again (although with esoteric stuff like PhantomReferences you can almost do it).

Re: Eclipse OpenJ9 – Open-source JVM

#25
post #23

Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?

Why would you want to add a delete keyword? Are you trying to add explicit memory management to simplify the work of the garbage collector?

One example would be game development, where people end up doing object pooling to avoid GC pauses dropping frames.

Re: Eclipse OpenJ9 – Open-source JVM

#26

Will a Java expert (JVM developer) please answer this question? Thank you. How impossible would it be to add a delete keyword to the JVM, and why?

Java does memory recovery strictly by garbage collection. To delete an object remove all references to that object and wait. A "delete now" operation imposes requirements on implementations that are not strictly required. Any advantages gained from destructors can be realized via explicit cleanup methods and (as a hedge against mis-use) state checking for initialized and destroyed objects. A delete operation also add…

Would it be impossible (or prohibitively difficult) to add it to an implementation, though?
Post reply on HN