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

do not garbage collect empty map/list/set #1168

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

dwightguth
Copy link
Collaborator

We move the empty map/list/set allocations to be allocated using new and never deallocated or relocated in order to assist in the thread safety of the llvm backend. When we make each allocation arena thread-local, this change will be required, otherwise garbage collection in one thread will corrupt collections in other threads.

@rv-jenkins rv-jenkins changed the base branch from master to develop November 26, 2024 17:46
@dwightguth dwightguth force-pushed the eternal_empty_collections branch from abbf58b to 861e11c Compare December 10, 2024 16:06
@dwightguth dwightguth marked this pull request as ready for review December 10, 2024 16:32
Copy link
Collaborator

@theo25 theo25 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 to me.

Copy link
Collaborator

@Robertorosmaninho Robertorosmaninho left a comment

Choose a reason for hiding this comment

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

LGTM. The deallocation will happen in each individual thread in the future?

modified:   .github/workflows/test.yml
- Update workflow files to reference the 'latest' macos tag
- Current latest OS version is MacOS 14.
@dwightguth
Copy link
Collaborator Author

@Robertorosmaninho the idea is that because there can be only one of this term across all threads, we allocate it somewhere where it never gets deallocated.

@dwightguth dwightguth enabled auto-merge (squash) December 10, 2024 18:44
@dwightguth dwightguth merged commit f098535 into develop Dec 10, 2024
10 checks passed
@dwightguth dwightguth deleted the eternal_empty_collections branch December 10, 2024 19:00
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.

4 participants