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

add flag to control whether gc should be enabled or not #1082

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

dwightguth
Copy link
Collaborator

This is one of a sequence of PRs designed to make progress towards generating stack maps so that we can trigger the GC during allocation rather than in between rewrite steps only. The first few PRs will be preliminaries that add small features that will be used by future PRs.

This PR adds a global variable that controls whether or not garbage collection is enabled. This boolean flag is disabled during certain call frames that it would be difficult to walk the stack of. In particular, we disable the flag during:

  • allocations that occur inside immer
  • calls to hooks
  • allocations that occur inside GMP and MPFR
  • construction of the initial configuration

The boolean flag is currently unused. It will be used in a future pull request to determine whether the allocator is allowed to trigger garbage collection at the current time.

@rv-jenkins rv-jenkins changed the base branch from master to develop June 3, 2024 17:07
@dwightguth dwightguth force-pushed the gc_enabled branch 2 times, most recently from 8f8cb96 to f6083d1 Compare June 3, 2024 18:11
@dwightguth dwightguth marked this pull request as ready for review June 4, 2024 17:29
@dwightguth dwightguth requested review from Baltoli and theo25 June 4, 2024 17:29
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

@dwightguth dwightguth merged commit 9eee51f into develop Jun 4, 2024
10 checks passed
@dwightguth dwightguth deleted the gc_enabled branch June 4, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants