Skip to content

Tweak computation of new heap area size #10525

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

Merged
merged 1 commit into from
Jul 30, 2025
Merged

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Jul 29, 2025

It now computes slightly more bytes to account for ATB size using truncated division. In other words, any remaining block space that doesn't fill an ATB byte won't be used. So, we round up our next area size to use an exact number of ATB bytes.

Fixes #10451

It now computes slightly more bytes to account for ATB size using
truncated division. In other words, any remaining block space that
doesn't fill an ATB byte won't be used. So, we round up our next
area size to use an exact number of ATB bytes.

Fixes micropython#10451
@tannewt tannewt requested a review from dhalbert July 29, 2025 21:56
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Seems to work fine with some smoke testing of large allocations.

@dhalbert dhalbert merged commit 6f87f10 into adafruit:main Jul 30, 2025
625 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MemoryError can occur when there is still lots of free memory
2 participants