3 ms·
Not if the set of answers includes "couldn't determine an upper bound". Many (but not all) problems become a whole lot easier if you restrict them to sane inpu
by adwn 8y ago
Not if the set of answers includes "couldn't determine an upper bound".
Many (but not all) problems become a whole lot easier if you restrict them to sane inputs. Determining an upper bound on stack size is especially interesting for, e.g., embedded software, and the intersection of "sane embedded program" and "program with complex stack size behavior" is rather small.
- SolarNet 8y agoSpecifically if features like function pointers are avoided, and tail call optimized recursive data structure functions are used. Hell for embedded uses if it can just determine it for some functions, and not others (like say anything involving dispatch) it would still be very useful. From writing: TaskCreate(&some_func, 2048 /* Hope this is enough stack */) To: TaskCreate(&some_func, sizeof(some_func)) would be amazing.