On 14 November 2012 10:14, Walter Bright <[email protected]> wrote:
>
> On 11/14/2012 1:03 AM, Don Clugston wrote:
>>
>>
>> At least, the ones created by const-folding are short-lived, and there
>> is rather a lot of them. This is extreme for CTFE, which is why CTFE
>> leaks so much memory.
>> Though actually I want to stop CTFE from creating mountains of garbage
>> in the first place.
>> I don't know how much of the total garbage is from const folding though.
>>
>
> What do you think of the feasibility of just having CTFE use reference
> counting?

I've been working towards CTFE owning all of its expressions.
An interesting thing about CTFE is that it's all strongly pure, so a
pool-based approach works really well. When CTFE finishes, copy the
result into new Expressions not owned by CTFE.
Then drop everything in the CTFE memory pool.
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to