Possibility of non stop-the-world GC in the future?

Benjamin Thaut code at benjamin-thaut.de
Mon Feb 18 10:00:57 PST 2013


Am 18.02.2013 18:49, schrieb JoeCoder:
>
> 1.  A @nogc attribute.  This would work similarly to pure/safe/nothrow
> and would check at compile time that annotated functions or any they
> call allocate any memory enforced by the GC.  Then phobos would no
> longer be a "landmine" for those with realtime requirements.
>

I really would love to have that too. The problem with this still would 
be exceptions because D throws by reference and not by value like C++. 
To make this work there would be the need to add a special Exception 
allocator and make the compiler emit delete calls in case the exception 
is caught and not rethrown or something similar.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list