Repository navigation
v4.4: vote_reward.rs: avoids calloc when creating new AccountSharedData (backport of #16101) - #16104
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v4.4 #16104 +/- ##
=======================================
Coverage 82.4% 82.4%
=======================================
Files 934 934
Lines 372233 372233
=======================================
+ Hits 306882 306932 +50
+ Misses 65351 65301 -50 🚀 New features to boost your workflow:
|
bw-solana
approved these changes
Oct 15, 2026
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.
Problem
Currently when we create a
AccountSharedDatafor when we update theVoteAccount, we are usingcallocfor creating the storage for the data.callocbypasses the memory allocator which messes up our jemalloc tracking.Summary of Changes
This change first creates an empty
Vecfor the data and thenresizes it so that we are usingreallocinstead. This should now go through the memory allocator.Testing
No new tests added
This is an automatic backport of pull request #16101 done by [Mergify](https://mergify.com).