Optimal resource allocation and optimal size in perennial plants