Skip to content
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

Merged
merged 3 commits into from
Sep 13, 2018
Merged

implement EspClass::getFreeContStack method #5133

merged 3 commits into from
Sep 13, 2018

Conversation

devyte
Copy link
Collaborator

@devyte devyte commented Sep 13, 2018

Fixes #5118

@@ -177,6 +178,12 @@ uint16_t EspClass::getMaxFreeBlockSize(void)
return umm_max_block_size();
}

uint32_t EspClass::getFreeContStack()
{
extern cont_t* g_pcont;
Copy link
Collaborator

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.

Copy link
Member

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?

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants