Skip to content
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

lang: Remove try_to_vec usage #2744

Merged
merged 4 commits into from
Dec 23, 2023

Conversation

acheroncrypto
Copy link
Collaborator

Problem

try_to_vec allocates 1024 bytes by default which is actually the MAX_RETURN_DATA for CPI. This is not necessary for the vast majority of programs so we've recently reduced the default capacity to 256 in #2691 but set_return_data still uses try_to_vec.

Summary of changes

Remove the usage of try_to_vec and make the default allocation of 256 similar to other places in the codebase.

Related: #2231

Copy link

vercel bot commented Dec 23, 2023

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit c4f14b9 into coral-xyz:master Dec 23, 2023
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant