News for hackers. Stuff that matters.
Re:Eclipse OpenJ9 – Open-source JVM by pron on Saturday September 16, 2017 @05:47PM (#15266925)
There are better ways to eliminate GC pauses than manual memory management (even ignoring the relatively new "pauseless" GCs). See the new RTSJ (realtime Java) specification here: https://www.aicas.com/cms/en/rtsj. Not that it's designed for far stricter requirements than games (cases where even microseconds of unexpected latency may result in actual life safety concerns).

Manual memory management is a good choice if you have both worst-case latency concerns as well as very restricted RAM and/or severe energy constraints (basically, the kind of applications that Rust was designed to handle).

Re:Eclipse OpenJ9 – Open-source JVM by jsiepkes on Saturday September 16, 2017 @06:21PM (#15267082)
JEP 189: Shenandoah: An Ultra-Low-Pause-Time Garbage Collector (http://openjdk.java.net/jeps/189) could help with that.
Re:Eclipse OpenJ9 – Open-source JVM by kuschku on Saturday September 16, 2017 @06:01PM (#15266987)
The RTSJ solution is to simply pre-allocate everything you could ever want and reuse that.

That’s horrible to use for game development.

Re:Eclipse OpenJ9 – Open-source JVM by pron on Sunday September 17, 2017 @02:54AM (#15268547)
> The RTSJ solution is to simply pre-allocate everything you could ever want and reuse that.

That's not the RTSJ solution. RTSJ uses arenas, which are great if you have regular allocation/deallocation cycles, like, say, a frame in a game.

Re:Eclipse OpenJ9 – Open-source JVM by kuschku on Sunday September 17, 2017 @03:16AM (#15268600)
> That's not the RTSJ solution. RTSJ uses arenas, which are great if you have regular allocation/deallocation cycles, like, say, a frame in a game.

So how do I get a user’s Oracle JRE installation to use arenas? The only realistic scenario is to preallocate and reuse.

Re:Eclipse OpenJ9 – Open-source JVM by pron on Sunday September 17, 2017 @06:08AM (#15268970)
You don't. You use an RTSJ JVM.
Re:Eclipse OpenJ9 – Open-source JVM by kuschku on Sunday September 17, 2017 @08:58AM (#15269397)
That’s not an option, that was the whole point of the discussion.
Re:Eclipse OpenJ9 – Open-source JVM by pron on Sunday September 17, 2017 @11:12AM (#15269963)
If changing the JVM spec is an option, then surely so is using an existing spec. IBM has an RTSJ JVM[1], which, I believe, is based on J9.

[1]: https://www.ibm.com/support/knowledgecenter/en/SSSTCZ_3.0.0/...

Re:Eclipse OpenJ9 – Open-source JVM by kuschku on Sunday September 17, 2017 @04:04PM (#15271434)
Changing the JVM spec has a chance at being applied in future normal JVMs. Using an entirely separate solution has not.
Re:Eclipse OpenJ9 – Open-source JVM by pron on Sunday September 17, 2017 @04:30PM (#15271539)
It's not an entirely separate solution, but a Java standard. In any event, it's probably overkill if all you need are acceptable pause-times for games (RTSJ is for hard-realtime, safety-critical systems, where even 2us jitter may kill someone). There are "pauseless" GCs for the JVM (with 1-10ms max pause, depending on the GC) without hard realtime guarantees. We just need more free implementations.
Re:Eclipse OpenJ9 – Open-source JVM by mstoodle on Monday September 18, 2017 @02:11AM (#15273708)
Eclipse OpenJ9's -Xgcpolicy:metronome is one of those GCs. Depending on how you well you configure your operating system, it defaults to 3ms pauses along with an application utilization contract.
Re:Eclipse OpenJ9 – Open-source JVM by merb on Saturday September 16, 2017 @06:23PM (#15267088)
I'm not a game developer, so why is that horrible? consider I have an array/map of my game objects and the rest only works with methods, so most stuff does not lie on the heap, well that means basically no strings, since they would add to heap memory aswell, but only using basic datatypes and arrays.

why would some kind of that be problematic? I mean graphics programmic is kind of new to me, but considering that you could offload that to a c/c++ engine via jni (that's another horrible thing of some kind), but just the game code itself doesn't seems to be to bad, does it?

Re:Eclipse OpenJ9 – Open-source JVM by kuschku on Sunday September 17, 2017 @03:15AM (#15268598)
> why would some kind of that be problematic? I mean graphics programmic is kind of new to me, but considering that you could offload that to a c/c++ engine via jni (that's another horrible thing of some kind), but just the game code itself doesn't seems to be to bad, does it?

The whole point is not to offload anything. If you need to offload anything, even the render loop, the language has failed.

Re:Eclipse OpenJ9 – Open-source JVM by imtringued on Sunday September 17, 2017 @08:05AM (#15269237)
Isn't that what almost every game does during loading screens?