More radical ideas about gc and reference counting

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun May 11 13:38:06 PDT 2014


On 5/11/2014 11:18 AM, Rainer Schuetze wrote:
> 1. Use a scheme that takes a snapshot of the heap, stack and registers at the
> moment of collection and do the actual collection in another thread/process
> while the application can continue to run. This is the way Leandro Lucarellas
> concurrent GC works (http://dconf.org/2013/talks/lucarella.html), but it relies
> on "fork" that doesn't exist on every OS/architecture. A manual copy of the
> memory won't scale to very large memory, though it might be compressed to
> possible pointers. Worst case it will need twice as much memory as the current
> heap.
>
> It would be very interesting how far we can push this model on the supported
> platforms.

This is worth doing even if it is only possible on a subset of platforms. D 
should not be constrained to the worst of all the platforms.

My recollection is that Leandro ran into some serious reentrancy problems in the 
Linux API. Was this ever resolved?



More information about the Digitalmars-d mailing list