Repository navigation
[8.8] [MOD-18996] Transfer allocation accounting between allocators - #1117
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
(cherry picked from commit eefc4e7)
GuyAv46
marked this pull request as draft
November 12, 2026 12:31
GuyAv46
marked this pull request as ready for review
November 12, 2026 12:31
GuyAv46
self-requested a review
November 12, 2026 12:31
GuyAv46
approved these changes
Nov 12, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.8 #1117 +/- ##
==========================================
+ Coverage 97.08% 97.11% +0.02%
==========================================
Files 142 142
Lines 8233 8240 +7
==========================================
+ Hits 7993 8002 +9
+ Misses 240 238 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 17, 2026
Merged
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.
Description
Backport of #1115 to
8.8.Note
Medium Risk
Touches per-allocator memory accounting; misuse or concurrent transfer could skew limits or double-free if ownership rules are violated, though behavior is scoped and heavily unit-tested.
Overview
Adds
VecSimAllocator::transferAllocationTo, which moves byte accounting for an existing pointer from one allocator to another without calling malloc/free or changing pointer contents or alignment. Null pointers and transfers to the same allocator are no-ops; the header documents that callers must own the allocation exclusively, align deleters with the new allocator, and that the twoallocatedcounters are updated separately (not atomically as a pair.Unit coverage is added via a new
test_allocation_transfertarget: balanced accounting across alignments and sizes, null/self and round-trip transfers, and a hook proving transfer does not invoke underlying alloc/free.Reviewed by Cursor Bugbot for commit 6b8f498. Bugbot is set up for automated code reviews on this repo. Configure here.