@nogc and exceptions

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 13 01:04:32 PDT 2014


13-Sep-2014 06:01, Jakob Ovrum пишет:
> On Friday, 12 September 2014 at 16:33:50 UTC, Dmitry Olshansky wrote:
>> Agreed.
>>
>> I think that the total amount of live (not garbage) exceptions on heap
>> is small for any typical application. Thus just special casing the
>> hell out of exception allocation in the GC (and compiler) is IMO
>> perfectly satisfactory hack.
>
> We can't use the GC as the whole point is to mark library code `@nogc`.
> It should work even if the user has ripped the GC out of druntime with a
> custom build.

Then call it "exception heap" or some such, and make sure it's somehow 
separate. It still means GC got to scan it.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list