3 ms·
As I said in another thread recently, garbage collectors don't have to be of the stop-the-world, non-deterministic kind. It's perfectly possible to have real-ti
by Varriount 10y ago
As I said in another thread recently, garbage collectors don't have to be of the stop-the-world, non-deterministic kind. It's perfectly possible to have real-time garbage collection [1], and the language I commonly work with supports soft real-time use with the default GC [2]. I'm no expert on garbage collection techniques, but what I have picked up is that most of the challenge lies in timing of the collections (when to run the GC) and how to deal with things like cycles.
[1] http://michaelrbernste.in/2013/06/03/real-time-garbage-collection-is-real.html http://michaelrbernste.in/2013/06/03/real-time-garbage-colle...
[2] http://nim-lang.org/docs/gc.html http://nim-lang.org/docs/gc.html
- pcl 10y agoYes, but the language chosen implied to me that it's using a stop-the-world approach. I've confirmed this by looking at the (surprisingly readable and small) code: http://www.ulisp.com/list?1BWZ http://www.ulisp.com/list?1BWZ Also, it looks like the algorithm is mostly deterministic, so that's good from a real-time standpoint. And it only runs if memory is about to be exhausted, so if the application ensured that it stayed within the Arduino's memory budget, it's essentially a no-op.