-
Notifications
You must be signed in to change notification settings - Fork 122
Improve STM32 heap allocation performance and debugging. #1662
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
Open
UncleGrumpy
wants to merge
6
commits into
atomvm:main
Choose a base branch
from
UncleGrumpy:stm32_heap_size
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pguyot
reviewed
May 24, 2025
2b91463
to
2e8e0c9
Compare
bettio
requested changes
Jun 4, 2025
2e8e0c9
to
347767c
Compare
bettio
requested changes
Jun 6, 2025
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.
We still need to add this change in UPDATING.md
with a short explaination about how to migrate existing code.
5860c50
to
1d151cd
Compare
Adds linker flag to display memory size information after building to STM32 platform libopencm3.cmake configuration file. Signed-off-by: Winford <winford@object.stream>
Make the local_heap_setup conditional unlikely to improve performance of memory allocation since this only is true only at the first memory allocation. Signed-off-by: Winford <winford@object.stream>
…latform Adds support for getting the current free heap size on STM32 platform using `erlang:system_info(atomvm_free_heap_size)`. Signed-off-by: Winford <winford@object.stream>
…2 platform Adds support for getting the current free heap size on STM32 platform using `erlang:system_info(atomvm_minimum_free_size)`. Signed-off-by: Winford <winford@object.stream>
…th atomvm_ prefix Adds new ESP32 erlang:system_info/1 heap memory keys `atomvm_free_heap_size` and `atomvm_minimum_free_size` to align with newly added STM32 memory keys. When the old keys are used a deprecation warning will be printed to the console to alert users to update to the new key names before the old keys are removed in the 0.8.x release cycle. Signed-off-by: Winford <winford@object.stream>
Adds documentation to the `erlang` module and "Programmer's Guide" for newly added STM32 system_info/1 keys. Signed-off-by: Winford <winford@object.stream>
1d151cd
to
bd195ad
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improves heap memory allocation performance by making the execution of the conditional
local_heap_setup
functionUNLIKELY
since this is only matches on the the first heap allocation.Improves application memory debugging on STM32 by adding
system_info/1
keysavm_free_heap_size
andavm_minimum_free_size
with functionality matching the esp32 keys for these statistics.Adds memory-size output report after compiling.
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later