Skip to content

docs(allocator): update docs with why Ordering::SeqCst is required#22086

Closed
overlookmotel wants to merge 1 commit intoom/05-02-refactor_allocator_fixed_size_allocators_handle_their_own_deallocationfrom
om/05-02-docs_allocator_update_docs_with_why_ordering_seqcst_is_required
Closed

docs(allocator): update docs with why Ordering::SeqCst is required#22086
overlookmotel wants to merge 1 commit intoom/05-02-refactor_allocator_fixed_size_allocators_handle_their_own_deallocationfrom
om/05-02-docs_allocator_update_docs_with_why_ordering_seqcst_is_required

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented May 2, 2026

Docs-only change. Update doc comment for FixedSizeAllocatorPool to explain why Ordering::SeqCst is necessary when checking if an arena chunk is double-owned or not during either Drop on Rust side, or GC on JS side.

Copy link
Copy Markdown
Member Author

overlookmotel commented May 2, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 2, 2026

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/05-02-docs_allocator_update_docs_with_why_ordering_seqcst_is_required (59566dd) with om/05-02-refactor_allocator_fixed_size_allocators_handle_their_own_deallocation (b90bd7e)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel self-assigned this May 2, 2026
@overlookmotel overlookmotel marked this pull request as ready for review May 2, 2026 21:22
Copilot AI review requested due to automatic review settings May 2, 2026 21:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Docs-only update clarifying the rationale behind using Ordering::SeqCst when toggling is_double_owned during allocator deallocation coordination between Rust Drop and the JS GC finalizer.

Changes:

  • Replaced the prior “not sure, using SeqCst to be safe” note with a more explicit explanation of the intended concurrency correctness requirements around is_double_owned.

Comment thread crates/oxc_allocator/src/pool/fixed_size.rs
@overlookmotel overlookmotel added C-docs Category - Documentation. Related to user-facing or internal documentation A-allocator Area - Allocator labels May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-allocator Area - Allocator C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants