D2 port of Sociomantic CDGC available for early experiments

Leandro Lucarella via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Oct 10 17:45:48 PDT 2014


Walter Bright, el  9 de October a las 17:28 me escribiste:
> On 10/9/2014 7:25 AM, Dicebot wrote:
> >At the same time I don't see what real benefit such runtime options brings to
> >the table. This is why in my PR garbage collector is currently chosen during
> >compilation time.
> 
> Choosing at compile time is probably best.

This is not (only) about picking a GC implementation, but also about GC
*options/configuration*. The fact that right now to select between
concurrent or not would mean using a different GC altogether is just an
implementation detail. As I said, if at some point we can merge both,
this wouldn't be necessary. Right now GDGC can disable the concurrent
scanning, among other cool things (like enabling memory stomping,
enabling logging of allocations to a file, enable logging of collections
to a file, controlling the initial pools of memory when the program
starts, etc.).

This is very convenient to turn on/off not exactly at *runtime* but what
I call *initialization time* or program startup. Because sometimes
recompiling the program with different parameters is quite annoying, and
as said before, for stuff that needs to be initialized *before* any
actual D code is executed, sometimes is not easy to be done *inside* D
code in a way that's not horrible and convoluted.

I still don't understand why wouldn't we use environment variables for
what they've been created for, it's foolish :-)

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
For long you live and high you fly
But only if you ride the tide
And balanced on the biggest wave
You race towards an early grave.


More information about the Digitalmars-d-announce mailing list