[Issue 21136] N sized array takes kN bytes in executable file

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 8 15:23:15 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21136

--- Comment #3 from KytoDragon <kytodragon at e.mail.de> ---
You can have them be zero initialized by assigning zero to the array:

double[1000000] = 0;

Do note that this only decreases the size of the executable. Once the program
is loaded into memory these array will obviously be expanded to their full
size.

--


More information about the Digitalmars-d-bugs mailing list