On Wednesday, 22 January 2014 at 21:46:08 UTC, Etienne wrote:
But yes, static array / memory blocks vs pointer+len explains it better, I'm trying to grow an idea of the concept of stacks but it's harder to work with, I thought it would help me catch an idea of why I couldn't prevent `ubyte[1024*1024] ub;` from crashing. While working with buffers, this is going to come in handy!
That could be simply a stack overflow error. On Windows, the maximum stack size is compiled into the executable, and the default for dmd is 1 mebibyte (you can, for example, add the flag "-L/STACK:268435456" to set it to 256 mebibytes instead). On Linux, you can control the stack size externally with ulimit tool.
Ivan Kazmenko.
