On Monday, 13 January 2014 at 10:59:44 UTC, Jacob Carlborg wrote:
Could we have a segregated heap for C pointers? Would that help? Basically having a special function allocating everything that should interface with C.
Is it possible to declare whether the C-function retains a pointer to the memory area or not, and to what extent? In general you will have to assume that the C code retains pointers not only to the object, but the transitive closure of anything that can be reached from it. That is quite extensive…
I also hope that the GC isn't fully modularized, because compiler support for specific GC strategies is likely to give better performance. Especially with whole program analysis.
It would be very nice to localize GC to a few threads. This would be useful in games where you only want to GC the AI/game mechanics portion of the simulated world, but use less demanding memory management for graphics, physics etc, which keeps running uninterrupted (one can interpolate/predict for a few frames giving the GC some more room to complete).
