refactor(allocator): ChunkFooter store pointer to backing allocation#21865
Merged
graphite-app[bot] merged 1 commit intoApr 27, 2026
Conversation
Member
Author
This was referenced Apr 27, 2026
Merged
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
Merge activity
|
#21865) Refactor to `Arena`. `ChunkFooter` contained `start_ptr`, pointing to the start of the chunk. This pointer is the same one as `start_ptr` in `Arena`, but they serve different purposes. The one `Arena` is the boundary beyond which allocations cannot be made in chunk, the one in `ChunkFooter` is used for deallocating the chunk's memory. Rename the field in `ChunkFooter` to `backing_alloc_ptr`, to reflect its purpose. This is a step towards allowing the allocatable region of chunks to be cut from within a larger allocation, in order to support uncommitted memory backing `Arena`'s chunks.
graphite-app Bot
pushed a commit
that referenced
this pull request
Apr 27, 2026
Refactor to `Arena`. `Arena::new_chunk` return the chunk's start pointer directly, rather than the caller having to obtain it from the `ChunkFooter`. This is a step towards separating the 2 pointers which live in `Arena` and `ChunkFooter`, continued in #21865.
bc5bfbe to
215e7ae
Compare
1a4aa2a to
76ee605
Compare
Base automatically changed from
om/04-26-refactor_allocator_arena_new_chunk_return_start_pointer
to
main
April 27, 2026 23:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Refactor to
Arena.ChunkFootercontainedstart_ptr, pointing to the start of the chunk. This pointer is the same one asstart_ptrinArena, but they serve different purposes. The oneArenais the boundary beyond which allocations cannot be made in chunk, the one inChunkFooteris used for deallocating the chunk's memory.Rename the field in
ChunkFootertobacking_alloc_ptr, to reflect its purpose.This is a step towards allowing the allocatable region of chunks to be cut from within a larger allocation, in order to support uncommitted memory backing
Arena's chunks.