> The lifetime of the coroutine state is strictly nested within the lifetime of the caller, and the size of coroutine frame is known at the call site in that case, coroutine state is embedded in the caller's stack frame (if the caller is an ordinary function) or coroutine state (if the caller is a coroutine)
Basically if you limit yourself to only functionality supported in Rust you'll never actually generate an allocation. Once you start using features Rust doesn't support you need to provided memory via some means.
https://en.cppreference.com/w/cpp/language/coroutines#Heap_a...