-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
implement EspClass::getFreeContStack method #5133
Conversation
cores/esp8266/Esp.cpp
Outdated
@@ -177,6 +178,12 @@ uint16_t EspClass::getMaxFreeBlockSize(void) | |||
return umm_max_block_size(); | |||
} | |||
|
|||
uint32_t EspClass::getFreeContStack() | |||
{ | |||
extern cont_t* g_pcont; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This declaration is already done in cont.h
As a general question, why don't we write these trivial functions directly inside the class ?
This would have the effect of reducing the final image size if they are not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since -ffunction-sections is used, all unused functions should be stripped anyway, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn right !
I was totally unaware of that and I thought that was the LTO feature that we don't have.
So I uselessly separated some code from Esp.cpp namely Esp-frag.cpp and Esp-version.cpp.
Thanks for opening my eyes, I will seek details on the differences between these two gcc/ld features.
Fixes #5118