Go Down

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



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.



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.


Some people are like Slinkies.

Not really good for anything, but they bring a smile to your face when pushed down the stairs.


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

Go Up