3 ms·
Rust – What Is Ownership?
- foldr 5y ago>All data stored on the stack must have a known, fixed size It's a bit confusing to find this statement in the middle of a generic discussion of the stack and the heap. It's true in Rust that everything allocated on the stack must have a fixed size, but plenty of other languages (e.g. C) allow dynamically sized stack allocations. (Of course C as such doesn't have a concept of 'stack allocation', strictly speaking, but you know what I mean :))