Go Down

Topic: Bug: Toggling a Single Boolean Constant from true/false takes 892 Bytes (Read 760 times) previous topic - next topic

BrendaEM

Hi,


In the supplied code, when using an Arduino Nano, if you change the joystick_enable constant from true to false, the memory footprint changes by 892 bytes, when compiling.

25818 - 26710 = 892 bytes or 3% of an Arduino nano, for a single constant change?

Please consider fixing this.

Thanks,
Brenda

pert

Please take the time to look at what setting joystick_enable to true actually does. There is a huge block of code following the if statement at line 1452 that will never be run if joystick_enable is false so the compiler optimizes that all away. If you comment all that code you'll see those 892 bytes go away. This isn't a bug.

Groove

Per Arduino ad Astra

PaulS

The art of getting good answers lies in asking good questions.

Go Up