Disable GC entirely

Johannes Pfau nospam at example.com
Thu Apr 11 06:29:42 PDT 2013


Am Thu, 11 Apr 2013 00:11:05 +1000
schrieb Manu <turkeyman at gmail.com>:

> >>
> >> Btw: implementing -vgc shouldn't be too difficult: We have to
> >> check all runtime hooks
> >> ( http://wiki.dlang.org/Runtime_**Hooks<http://wiki.dlang.org/Runtime_Hooks>)
> >> for allocations, then check all places in dmd where calls to those
> >> hooks are emitted.
> >>
> >>
> > It's actually very easy to find hidden allocations. If you remove
> > the gc entierly from the runtime hidden allocations will cause
> > linker errors.
> >
> 
> Not a particularly user-friendly approach. I'd rather think of some
> proper tools/mechanisms to help in this area :)
> 

I like
"test-vgc.d(9) vgc[CONCAT]: (a ~ b) causes gc allocation"
a lot more than
"undefined reference to gc_alloc" ;-)

I posted a proof of concept pull request here:
https://github.com/D-Programming-Language/dmd/pull/1886

It needs some work but maybe it will be ready for 2.063. Would be
great if both of you could comment there as you probably have most
experience in avoiding the GC :-)


More information about the Digitalmars-d mailing list