Ref counting for CTFE?

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 2 00:18:49 PDT 2014


On Friday, 30 May 2014 at 03:11:27 UTC, Puming wrote:
> On Thursday, 29 May 2014 at 20:44:43 UTC, Dicebot wrote:
>
>> I'd love to see command-line flag that enables garbage 
>> collection in compiler (disabled by default). It does not 
>> matter how fast compiler is if it crashes on big project. And 
>> difference between 10 seconds vs 30 seconds is not as 
>> important as difference between 2 seconds vs 10 seconds anyway.
>
> I'd like to provide another use case:
>
> I use vibe.d to host my website in a DigitalOcean virtual 
> machine with 512M RAM, which is the cheapest and most popular 
> VPS sulotion out there. But I can't build my dub/vibe.d project 
> on it because 512M RAM is far from enough for any CTFE related 
> code to build. It crashes every time. My solution now is to use 
> a VirtualBox ubuntu on my Mac/Win8 to build the project and 
> rsync it on to DigitalOcean. Which is very slow turnaround.
>
> I think to make D based web programming popular, we have to 
> make it possible to run on most of the cloud PAAS platforms 
> (see Python/GoogleAppEngine and Ruby/Heroku and all those PHP 
> machines out there). 512M RAM is a crucial deadline for the 
> compiler's memory usage if we really want that to happen.

I have run into exactly this issue before, which I mentioned in 
the redesign thread. I'm not sure how this can be fixed, but it 
does need to be fixed. I think perhaps a compiler switch for 
lower memory environments would be acceptable.


More information about the Digitalmars-d mailing list