Skip to content

docs(allocator): correct doc comment for Allocator::from_raw_parts#22093

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/05-03-docs_allocator_correct_doc_comment_for_allocator_from_raw_parts_
May 3, 2026
Merged

docs(allocator): correct doc comment for Allocator::from_raw_parts#22093
graphite-app[bot] merged 1 commit into
mainfrom
om/05-03-docs_allocator_correct_doc_comment_for_allocator_from_raw_parts_

Conversation

@overlookmotel

@overlookmotel overlookmotel commented May 3, 2026

Copy link
Copy Markdown
Member

Comments-only change. #22085 altered the docs for Arena::from_raw_parts to reflect that arena chunk created by this method will be deallocated via System allocator by default, but neglected to update docs for Allocator::from_raw_parts. Update the doc comment for this method to bring it into sync.

overlookmotel commented May 3, 2026

Copy link
Copy Markdown
Member Author

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.

@overlookmotel overlookmotel self-assigned this May 3, 2026
@overlookmotel overlookmotel marked this pull request as ready for review May 3, 2026 09:35
Copilot AI review requested due to automatic review settings May 3, 2026 09:35
@overlookmotel overlookmotel added C-docs Category - Documentation. Related to user-facing or internal documentation A-allocator Area - Allocator labels May 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR is a docs-only follow-up to #22085 that brings Allocator::from_raw_parts documentation back in sync with the allocator behavior introduced for fixed-size arenas. It clarifies the safety contract around ownership and deallocation so callers know the backing allocation is freed through std::alloc::System, not the global allocator.

Changes:

  • Update Allocator::from_raw_parts docs to state that dropped allocators free backing memory via System.
  • Correct the safety requirements to say the backing allocation must originate from System unless cleanup is handled manually.
  • Add an explicit intra-doc link for System.

@codspeed-hq

codspeed-hq Bot commented May 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/05-03-docs_allocator_correct_doc_comment_for_allocator_from_raw_parts_ (62ec410) with main (0bf0cb9)2

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.

  2. No successful run was found on main (62ec410) during the generation of this report, so 0bf0cb9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app

graphite-app Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Merge activity

…22093)

Comments-only change. #22085 altered the docs for `Arena::from_raw_parts` to reflect that arena chunk created by this method will be deallocated via `System` allocator by default, but neglected to update docs for `Allocator::from_raw_parts`. Update the doc comment for this method to bring it into sync.
@graphite-app graphite-app Bot force-pushed the om/05-03-docs_allocator_correct_typos_in_comments branch from fe3d952 to 3e152c6 Compare May 3, 2026 09:59
@graphite-app graphite-app Bot force-pushed the om/05-03-docs_allocator_correct_doc_comment_for_allocator_from_raw_parts_ branch from 0ffd123 to 62ec410 Compare May 3, 2026 10:00
Base automatically changed from om/05-03-docs_allocator_correct_typos_in_comments to main May 3, 2026 10:03
@graphite-app graphite-app Bot merged commit 62ec410 into main May 3, 2026
37 checks passed
@graphite-app graphite-app Bot deleted the om/05-03-docs_allocator_correct_doc_comment_for_allocator_from_raw_parts_ branch May 3, 2026 10:04
camc314 added a commit that referenced this pull request May 5, 2026
### 💥 BREAKING CHANGES

- 0ffbe0d allocator: [**BREAKING**] Remove `Allocator::end_ptr` method
(#21871) (overlookmotel)

### 🚀 Features

- 9593ec8 transformer/jsx: Add jsxDEV source metadata for fragments
(#21932) (Ido Rosenthal)

### 🐛 Bug Fixes

- 429deac napi/parser: Export `visitorKeys` from `wasm` entrypoint
(#21996) (NullVoxPopuli)
- e852911 codegen: Preserve legal comments orphaned by upstream passes
(#21575) (Dunqing)
- e3399ec transformer/class-properties: Preserve RHS in
logical-assignment to static private field (#21950) (Dunqing)
- c59c199 transformer/typescript: Emit class fields for parameter
properties (#21831) (Dunqing)
- aaabde4 parser: Attach legal comments to following token (#21670)
(Dunqing)

### ⚡ Performance

- 0bf0cb9 allocator: Per-platform `Arena::new_fixed_size`
implementations (#22088) (overlookmotel)

### 📚 Documentation

- 62ec410 allocator: Correct doc comment for `Allocator::from_raw_parts`
(#22093) (overlookmotel)
- 3e152c6 allocator: Correct typos in comments (#22092) (overlookmotel)
- e220855 allocator: Correct doc comment for `Allocator::set_cursor_ptr`
(#21866) (overlookmotel)

---------

Co-authored-by: Boshen <[email protected]>
Co-authored-by: Cameron Clark <[email protected]>
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