Skip to content

Keep track of data reallocations in BorrowedAccount #5360

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

seanyoung
Copy link

Problem

With direct mapping, we clear the spare capacity in the data Vec when the account size shrinks. When a reallocation happens in Vec, the data maybe copied to a new location, but the spare capacity in the Vec will no longer be cleared. So, keep track of reallocations.

Summary of Changes

Copy link

mergify bot commented Mar 18, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@seanyoung seanyoung force-pushed the realloc-dont-move-pointers branch from 1df6595 to a19761a Compare March 19, 2025 10:52
@mergify mergify bot requested a review from a team April 6, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant