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 heap chunk recycling memory leak and another bug #4535

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

dipinhora
Copy link
Contributor

The implementation of actor heap chunk recycling from #4531 had two bugs. First, the large heap re-use logic (which was temporarily disabled in #4534) had a bug related to how it updated the large chunk recyclable list pointer in the heap. Second, the memory clearing logic in the ponyint_heap_endgc function was clearing more of the heap than it should have been resulting in a memory leak for both small and large chunk recyclable chunks.

This commit re-enabled large chunk recycling (undoing #4534) and fixes both bugs so that both large chunk and small chunk recycling work as expected without memory leaks.

The implementation of actor heap chunk recycling from ponylang#4531 had two
bugs. First, the large heap re-use logic (which was temporarily
disabled in ponylang#4534) had a bug related to how it updated the large
chunk recyclable list pointer in the heap. Second, the memory
clearing logic in the `ponyint_heap_endgc` function was clearing
more of the heap than it should have been resulting in a memory
leak for both small and large chunk recyclable chunks.

This commit re-enabled large chunk recycling (undoing ponylang#4534) and
fixes both bugs so that both large chunk and small chunk recycling
work as expected without memory leaks.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Oct 27, 2024
@SeanTAllen SeanTAllen merged commit 23c2bc9 into ponylang:main Oct 27, 2024
23 checks passed
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Oct 27, 2024
@SeanTAllen
Copy link
Member

Everything ran properly last night @dipinhora

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss during sync Should be discussed during an upcoming sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants