Repository navigation
Give PSRAM ESP32 boards without LVGL their full Python heap back - #11971
Open
mikeysklar wants to merge 1 commit into
Open
mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
port_heap_get_largest_free_size() was changed to hold back a quarter of the 8-bit heap (up to 4 MB) on every board with SPIRAM, for the LVGL display stack. Boards without LVGL, like the Metro ESP32-S2 (2 MB PSRAM), lost that share of gc.mem_free() and of the largest allocatable block. Only apply the reserve when CIRCUITPY_DISPLAYIO_LVGL is enabled. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
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
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.
What
Hold back the PSRAM reserve only on boards that build with LVGL.
Why
Since #11887 every PSRAM board keeps a quarter of its heap from Python, even without LVGL.
Testing
gc.mem_free()beforeThree samples each, all identical. S2 before is 11.0.0-beta.0; S3 before is main, built from the same commit.
Boards affected (PSRAM set in
mpconfigboard.mk; LVGL is on only for the P4 and S31):🤖 Generated with Claude Code