4 ms·
I would argue that it actually might not matter too much: 1. In a constraint context (embedded/kernel) you want to preallocate most things anyway, since even n
by Matthias247 7y ago
I would argue that it actually might not matter too much:
1. In a constraint context (embedded/kernel) you want to preallocate most things anyway, since even normal malloc/free isn't deterministic. Once you preallocate objects, it doesn't matter if those are coming from a long-lived GCed heap or from somewhere else.
2. Kernels like Linux rely on the fact that some small allocations never fail. Plugging in a GC and asserting that it won't fail would have the same effect (with some impact on latencies).
What might be most important is that the language supports explicit stack allocations, which avoids the need for any kind of heap when necessary. That is given for languages like C# and Go.