With the new stack coloring it is possible to capture the max task stack size and adjust. The basic working procedure is: 1. Calculate a worst case stack size and add some additional head room. 2. Add a call to the Scheduler.stack() member function and capture the maximum head room during execution. 3. Reduce the initial stack size.