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

Turn the heap into an optional module #357

Closed
salkinium opened this issue Mar 18, 2020 · 1 comment · Fixed by #364
Closed

Turn the heap into an optional module #357

salkinium opened this issue Mar 18, 2020 · 1 comment · Fixed by #364

Comments

@salkinium
Copy link
Member

salkinium commented Mar 18, 2020

This allows for a heapless mode, which asserts on malloc and new operators (or deletes them?) and removes the heap and its initialization code from the linkerscript.

This allows ultra-low memory devices (AVRs and STM32L0) to use more of their RAM for static data and to assure developers that they are indeed not using any heap.
Our HAL and most classes should support this out of the box, otherwise they can transparently depend on the heap module (which maybe logs that is is used).

@salkinium
Copy link
Member Author

salkinium commented Mar 18, 2020

Oh, just discovered we already have a module called :architecture:heap, which currently only defines the additional memory traits.
But it's always depended upon and implemented by :platform:core/:platform:cortex-m, so that needs to be actually implemented properly.

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

Successfully merging a pull request may close this issue.

1 participant