A key factor to a successful layout design is the allocation of the limited buffer space between the work cells of a production line. Based on a closed-form solution, this paper presents an algorithm for the optimum allocation of buffer stocks in flexible transfer lines. The analysis assumes the availability of a general storage area (central buffer), where blocked jobs can be kept until needed. Although the algorithm is devloped for Markovian systems, it has been found applicable also to non-Markovian ones.