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

fix flash_cache_table allocation failures; clean up code #9169

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

dhalbert
Copy link
Collaborator

There were problems when the flash_cache_table entries could not be completely allocated. That code was made simpler. In addition there were some missing guards handling the case when the flash_cache_table itself could not be allocated.

I made some #defines that simplified some size values that were used multiple places.

release_ram_cache() was moved up in declaration order so it could be newly called from another routine. It now handles cleanup of an only partially-allocated flash_cache_table.

@dhalbert dhalbert requested a review from tannewt April 11, 2024 19:09
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks!

Did you find this code in any ports/<port>/supervisor/internal_flash.c?

@dhalbert
Copy link
Collaborator Author

Did you find this code in any ports/<port>/supervisor/internal_flash.c?

I didn't look. I will!

@dhalbert dhalbert merged commit 29eeef9 into adafruit:9.0.x Apr 12, 2024
114 checks passed
@dhalbert dhalbert deleted the flash_cache_table-fix branch April 23, 2024 15:51
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.

2 participants