← Back to context

Comment by cogman10

16 hours ago

Unfortunately, the JVM and collectors like the JVM's plays really bad with virtual memory. (Actually, G1 might play better. Everything else does not).

The issue is that through the standard course of a JVM application running, every allocated page will ultimately be touched. The JVM fills up new gen, runs a minor collection, moves old objects to old gen, and continues until old gen gets filled. When old gen is filled, a major collection is triggered and all the live objects get moved around in memory.

This natural action of the JVM means you'll see a sawtooth of used memory in a properly running JVM where the peak of the sawtooth occasionally hits the memory maximum, which in turn causes the used memory to plummet.

Depends on which JVM, PTC and Aicas do alright with their real time GCs for embedded deployment.

  • I've never really used anything other than the OpenJDK and Azuls.

    How does PTC and Aicas does GC? Is it ref counted? I'm guessing they aren't doing moving collectors.

    • They are real time GCs, nothing to do with refcounting.

      One of the founding members of Aicas is the author of "Hard Realtime Garbage Collection in Modern Object Oriented Programming Languages" book, which was done as part of his PhD.