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

[release/6.0] Fix issue in decommit_ephemeral_segment_pages (segment case). #60170

Merged
merged 1 commit into from
Oct 11, 2021

Commits on Oct 8, 2021

  1. Fix issue in decommit_ephemeral_segment_pages (segment case).

    We assume that we can use half the free list space in gen 0 for new allocation. If that is too optimistic, we may allocate into decommitted memory and crash in the allocator. That is because there is a race condition between the allocating thread and the decommitting thread - we decided to avoid that by making sure we would never decommit memory that we may allocate in gen 0.
    
    There are two reasons why assuming we can use half the free list space for new allocations may be too optimistic:
     - if we allocate large objects in gen 0, we may not have free spaces of the necessary size available.
    - when background GC goes into background_ephemeral_sweep, it deletes and rebuilds the free list for gen 0. A thread trying to allocate during that time may see a completely empty free list.
    PeterSolMS authored and github-actions committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    ab8ecc4 View commit details
    Browse the repository at this point in the history