-
Notifications
You must be signed in to change notification settings - Fork 108
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
The storage in UnwindContext.stack
was changed to a Vec
#683
Comments
IIRC In majority of cases of unwinding this stack is not needed. The previous 4-element storage consumes quite a bit of stack. If you are allowed to allocate then it's better off to just use a Vec so that it doesn't allocate in fast path. |
It always needs at least one element for the rules, so it needs to allocate in every case: Line 2010 in 531636d
That's why the documentation and example suggested putting the The advantage using only 4 elements is that it puts an upper bound on memory usage, and it is sufficient for all CFI in practice. |
Ah, the current row. How about store the current row along side with the stack then? |
#595 changed the storage of
UnwindContext.stack
from an array to aVec
. @nbdd0121 Was this an intentional change? I'm inclined to change it back. I think defaulting to a fixed size allocation is preferable.The text was updated successfully, but these errors were encountered: