Re:C++14: Transducers
by pron on Wednesday December 16, 2015 @01:14PM
(#10746065)
I've used a GC language (Java) in hard-realtime systems successfully. Realtime Java (RTSJ) gives you control over which threads can trigger a GC and which operate in an arena. Even hard realtime systems have a very small core that's actually hard realtime, and real-time Java isolates it nicely.
[ Parent
| on HN ]
Isn't that effectively the same thing as embedding the JVM inside C/C++ with thread execution control?
From what I've read on the RTJS spec the real-time areas you're talking about use an arena allocator which is a different memory allocation strategy than GC.
> Isn't that effectively the same thing as embedding the JVM inside C/C++ with thread execution control?
I don't see how.
> From what I've read on the RTJS spec the real-time areas you're talking about use an arena allocator which is a different memory allocation strategy than GC.
Yes, but both hard- and soft-realtime threads (that do use a GC) share the same JVM and can share some objects. Also, keep in mind that realtime JVMs guarantee scheduling latency for hard realtime threads of up to a few microseconds. If you can live with higher latencies, you can use realtime GCs.