Skip to content

TilePaletteMapper memory fix #10306

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
May 1, 2025
Merged

Conversation

FoamyGuy
Copy link
Collaborator

@FoamyGuy FoamyGuy commented May 1, 2025

resolves: #10305

I'm not certain if this is the proper fix, but it does seem to successfully make TilePaletteMapper behave as expected. If it would be better to use m_malloc_helper or something else I'm happy to change this to whatever is best.

I wouldn't say that I have a complete understanding of the recent memory / GC improvements, but I think that I understand the basic gist of it. My theory is that self->tile_mappings was changed to being allocated as "without pointers" but it does actually hold pointers that point to more pointers of u_int32s so it needed to be allocated the opposite way.

@FoamyGuy FoamyGuy changed the title use m_malloc for outter mappings pointers TilePaletteMapper memory fix May 1, 2025
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.

Thanks! You are right. I did a bulk change and didn't look for pointer allocations. Will take a look again now.

@tannewt tannewt merged commit 5c41950 into adafruit:main May 1, 2025
512 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.

TilePaletteMapper is misbehaving in absolute newest
2 participants