#question about binary size

1 messages · Page 1 of 1 (latest)

analog flax
#

does making static array variables increase the size of the binary?
my binary is at 50 megabytes now, it's a debug build. but that's getting unwieldy now.

i have a bunch of static arrays, some are created at runtime, some at compile time.

#

is there other code practices to reduce the binary size?

winged nimbus
#

any static array that isn't initialized to all zeros must be present in the binary, theres nowhere else to store it

mortal fractal
#

embedfile compressed data - trade binary size for runtime allocation and decompression, but really, I don't quite understand the obsession with stuffing everything into one file.

winged nimbus
#

or just fill the array at runtime

mortal fractal
#

True, could have a large static array in bss, and read into it, if a one-time allocation is a problem for you. What slow in allocations is doing a lot of them.