On Tuesday, 13 February 2018 at 12:17:31 UTC, number wrote:
On Sunday, 11 February 2018 at 15:05:26 UTC, number wrote:
On Sunday, 11 February 2018 at 13:17:13 UTC, number wrote:
unable to fork: Cannot allocate memory

if i comment-out the line..
writeln(GdkKeysyms.GDK_Escape);

then it compiles/links/runs fine.



I just tried again.
compiling the following code eats up my 4GB of RAM and fails. Please copy the enumeration from: https://github.com/gtkd-developers/GtkD/blob/master/generated/gtkd/gdk/Keysyms.d
into the code.


import std.stdio;

void main()
{
        writeln(GdkKeysyms.GDK_Escape);
}

public enum GdkKeysyms
{
        ...
}


Reducing the number of enum entries step by step finally will make the compilation succeed. Is it normal that it needs so much memory?

Yes unfortunately std.conv approaches the problem of printing enums with recursive templates , which eat a ton of memory.

Reply via email to