3 ms·
> This isn't Rust's fault per se; non-segmented architectures don't have an architecturally defined way to know the stack base. Bounding stack usage is of cour
by zozbot234 5y ago
> This isn't Rust's fault per se; non-segmented architectures don't have an architecturally defined way to know the stack base.
Bounding stack usage is of course a whole-program concern, but that ought to be feasible when building for embedded, where external "plugin" components are unlikely and there's no inherent need for true separate compilation. (Arguably, in such cases even the need for an actual "stack" structure is actually quite limited; a smarter compiler might well replace many uses of the activation stack with references to static data, reserving it for cases where e.g. reentrancy is actively needed. AIUI, there has been some work along those lines for LLVM.)
- bcantrill 5y agoBut to get back to your original question: you can see why the state of things today necessitates the use of the MPU, even for Rust?