Ref counting for CTFE?
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 29 10:56:29 PDT 2014
On Thu, 29 May 2014 13:54:07 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:
> On 05/29/2014 07:33 PM, Steven Schveighoffer wrote:
>>
>> But CTFE is full of code that expects to have a GC running, e.g. string
>> concatenation for mixins, etc.
>
> Even the following code runs out of memory on my machine:
>
> int foo(){
> foreach(i;0..100000000){}
> return 2;
> }
> pragma(msg, foo());
>
> I.e. incrementing the loop counter consumes memory.
Yes, this is the bug referenced earlier by safetyOff.
-Steve
More information about the Digitalmars-d
mailing list