Smarter sizing of stack buffer.