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

c#: perfer using fixed over GCalloc #1150

Open
jsturtevant opened this issue Jan 30, 2025 · 1 comment
Open

c#: perfer using fixed over GCalloc #1150

jsturtevant opened this issue Jan 30, 2025 · 1 comment
Labels
gen-c# Related to the C# code generator

Comments

@pavelsavara
Copy link
Collaborator

It is then "best practice" to keep stack allocations small (all stackallocs for a single method should typically add up to not more than 1024 bytes) and to never make them "dynamic" in length (instead rounding up to the largest buffer size).

From dotnet/runtime#52065 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gen-c# Related to the C# code generator
Projects
None yet
Development

No branches or pull requests

2 participants