buzz
buzz copied to clipboard
Resize stack when needed
Right now the stack is a fixed array of 100 000 elements.
- Detect when stack is overflowed
- If under a high limit (lua is 1 000 000), realloc stack (requires to update any reference to it)
- If higher that limit, throw
.StackOverflow
Reading https://without.boats/blog/why-async-rust/ I realized that creating a fiber (and so a new stack) could be a performance and memory impact.
Do we need relatively short stack at the beginning and grow or shrink it as needed?