dmd out of memory compiling vibed project

Guillaume guillaume at spam.spam
Wed May 22 16:14:39 UTC 2019


On Wednesday, 22 May 2019 at 14:11:07 UTC, Anonymouse wrote:
> On Wednesday, 22 May 2019 at 13:25:00 UTC, krzaq wrote:
>> On Wednesday, 22 May 2019 at 13:09:37 UTC, Suliman wrote:
>>> Absolutely same problem. -lowmem did not get any affect on my 
>>> VPS (1GB ram). I was able to compile project only in 
>>> singleFile mode.
>>
>> In those situations you can go with a swapfile.
>
> Does it circumvent process memory limits? Regardless it's not 
> an option if you're dealing with CI and you don't have the 
> neccessary permissions.
>
> $ fallocate -l 4G /tmp/swapfile
> $ chmod 600 /tmp/swapfile
> $ mkswap /tmp/swapfile
> Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
> no label, UUID=7112294b-812a-4765-a3b9-41aa545daa70
> $ sudo swapon /tmp/swapfile
> swapon: /tmp/swapfile: insecure file owner 3434, 0 (root) 
> suggested.
> swapon: /tmp/swapfile: swapon failed: Operation not permitted

I think it will work if you use sudo on all the commands 
(fallocate, chmod, mkswap), not just swapon.

But it doesn't work for my case since I cannot have a swapfile on 
my weird setup.

Other ideas?


More information about the Digitalmars-d mailing list