Computing stack frame size and layout