archives

FijiVM: Compile Java source to Native with Realtime GC

(Search didn't turn up this posted on LtU yet.) Since I want to be able to write video games in a high-level, cross-platform manner, I am always happy to learn about things like the FijiVM which purports to give me realtime GC for my Java code, and hopefully have to neither (a) pay lot$ for it [edit: oh it looks closed and requiring $ after all :-] nor (b) run it on big server iron.

The key part of the FijiVM is a set of garbage collector algorithms that offer various performance characteristics and real-time guarantees. You can find more information about FijiVM's GC in Schism: Fragmentation-Tolerant Real-Time Garbage Collection. PLDI'10.

The key insight to getting constant-time heap access is to replace tries with arraylets. Arraylets represent arrays as a spine (a contiguous array) containing pointers to a set of array fragments. While objects can also be represented as arraylets, the Schism ap- proach follows Siebert [18] and allocates these as linked lists of fixed-size fragments. This choice is motivated by the fact that most objects are small and are always of statically known size. Thus even with a linked representation it is possible to have a precise cost of any field access, and this cost does not vary.

SCHISM/CMR is the only collector that supports all the features; other collectors either can not deal with fragmentation or increasing the cost of heap accesses.

Please tell me if you know about other systems that offer portable, high-level, and performant environments. [Edit: There are actually plenty of JVMs that go for the RTSJ type stuff, and most appear to be commercial.]

(P.S. I liked the image that shows how complex a decent compiler can be quite a bit.)