3 ms·
you understand that stack allocation can OOM too?
by dnautics 10mo ago
you understand that stack allocation can OOM too?
- craftkiller 10mo agoCan C gracefully recover from running out of stack space?
- fulafel 10mo agoDepends on your definition of graceful but the C standard doesn't preclude handling it and there's POSIX interfaces such as sigaltstack / sigsetjmp etc that fit and indeed some code like language runtimes use this to react to stack exhaustion (having first set up guard pages etc).
- kibwen 10mo agoOr in short: no, C is no better than Rust at gracefully recovering from stack overflow, either in theory or in practice.
- deleted 10mo ago[deleted]