-
-
Notifications
You must be signed in to change notification settings - Fork 727
feat(allocator): add data_end_ptr and set_cursor_ptr methods to Allocator
#13134
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
feat(allocator): add data_end_ptr and set_cursor_ptr methods to Allocator
#13134
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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 Instrumentation Performance ReportMerging #13134 will not alter performanceComparing Summary
Footnotes |
11cb71b to
ab90104
Compare
ab90104 to
81db99e
Compare
There was a problem hiding this comment.
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 adds two new unsafe methods to the Allocator struct to provide lower-level memory management capabilities. The methods allow direct manipulation of the allocator's internal pointers and are only available when the from_raw_parts cargo feature is enabled.
- Adds
set_cursor_ptrmethod for manually setting the cursor pointer within the current chunk - Adds
data_end_ptrmethod to get a pointer to the end of the data region in the current chunk
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
3a1001c to
c8b97de
Compare
81db99e to
7e6db63
Compare
7e6db63 to
5bd7d9e
Compare
Merge activity
|
…Allocator` (#13134) Add 2 more unsafe methods to `Allocator` to meddle with its internals. These methods are only present when `from_raw_parts` cargo feature is enabled. These methods are used in a later PR in this stack, to write flags for which JS threads an `Allocator` is shared with into the `Allocator`s memory.
5bd7d9e to
7cf6186
Compare
…thods (#13139) Correct safety comments on unsafe methods of `Allocator`, as suggested by AI in #13134 (review). Also expand the safety comments for `Allocator::set_data_ptr`, and add comments on how its invariants are upheld at call sites. Also correct typos and improve comment formatting.

Add 2 more unsafe methods to
Allocatorto meddle with its internals. These methods are only present whenfrom_raw_partscargo feature is enabled.These methods are used in a later PR in this stack, to write flags for which JS threads an
Allocatoris shared with into theAllocators memory.