I think you missed my "/int.sizeof" at the end. enum size = (16*1024*1024)/int.sizeof; int[size] a; // "Error index overflow for static" as expected int[size-1] b; // stack overflow int[250_001] c; // stack overflow int[250_000] d; // ok