DIP60: @nogc attribute

Byron via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 18 07:45:37 PDT 2014


On Thu, 17 Apr 2014 11:55:14 +0000, w0rp wrote:

> I'm not convinced that any automatic memory management scheme will buy
> much with real time applications. Generally with real-time processes,
> you need to pre-allocate. I think GC could be feasible for a real-time
> application if the GC is precise and collections are scheduled, instead
> of run randomly. Scoped memory also helps.

I thought the current GC only ran on allocations? If so @nogc is *very* 
useful to enforce critical paths. If we added a @nogcscan on blocks that 
do not contain pointers we maybe able to reduce the collection time, not 
as good as a precise collector.  I would think we can get decent compiler 
support for this (ie.  no refs, pointers, class, dynamic array).


More information about the Digitalmars-d mailing list