A different, precise TLS garbage collector?

Etienne Cimon via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 16 08:07:10 PST 2014


On 2014-11-16 10:20, Sean Kelly wrote:
> We'll have to change the way "immutable" is treated for allocations.
> Which I think is a good thing.  Just because something can be shared
> doesn't meant that I intend to share it.

Exactly, I'm not sure how DMD currently handles immutable but it should 
automatically be mangled in the global namespace in the application data.

If this seems feasible to everyone I wouldn't mind forking the precise 
GC into a thread-local library, without any "stop the world" slowdown.

A laptop with 4 cores in a multi-threaded application would 
(theoretically) run through the marking/collect process 4 times faster, 
and allocate unbelievably faster due to no locks :)

The only problem is having to manually allocate shared objects, which 
seems fine because most of the time they'd be deallocated in shared 
static ~this anyways.


More information about the Digitalmars-d mailing list