-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple instances of INADDR_NONE [imported] #1007
Labels
Component: Core
Related to the code for the standard Arduino API
Comments
I can see this bug is still happening even in the latest IPAddress.h version.
If IPAddress.h is imported/used in multiple files it causes big SRAM space loss. const IPAddress INADDR_NONE(0,0,0,0); should me marked extern and defined in IPAddress.cpp |
per1234
added
the
Component: Core
Related to the code for the standard Arduino API
label
Jul 2, 2017
I just ran across this bug while trying to figure out what was eating all my sram in .data and .bss. Turns out I had about 15 copies of this and at 6 bytes each that's a big chunk. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is Issue 1007 moved from a Google Code project.
Added by 2012-08-16T18:20:18.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expect only a single instance of INADDR_NONE in .bss section, but multiple are allocated, consuming precious SRAM space (in my case of a bigger piece of software, seven instances).
Note also that IPAddress consumes six bytes, not four, due to the class pointer required for the virtual function.
This is on arduino-1.0.1 under Windows 7.
Please provide any additional information below.
Suggest to declare INADDR_NONE extern in IPAddress.h, and to define it in IPAddress.cpp.
The text was updated successfully, but these errors were encountered: