Skip to content

Conversation

wks
Copy link
Collaborator

@wks wks commented Sep 1, 2025

We rewrite the function into a more linear style and remove duplicated code of handling blocking for GC.

Although this PR does not intend to change the logic of Space::acquire, it does fix some obvious bugs.

  • Previously if the current thread is a mutator, or GC is not enabled,
    the thread will attempt to poll and block for GC if it fails to get
    new pages from the PageResource. Now it panicks.

  • Previously the on_pending_allocation after failing to get new
    pages from PageResource did not include side metadata. Now it
    always includes side metadata.

We rewrite the function into a more linear style and remove duplicated
code of handling blocking for GC.

Although this PR does not intend to change the logic of Space::acquire,
it does fix some obvious bugs.

-   Previously if the current thread is a mutator, or GC is not enabled,
    the thread will attempt to poll and block for GC if it fails to get
    new pages from the PageResource.  Now it panicks.

-   Previously the `on_pending_allocation` after failing to get new
    pages from PageResource did not include side metadata.  Now it
    always includes side metadata.
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.

1 participant