Abstract. Theoretical models of the equation of state (EOS) of neutronstar matter (starting with the crust and ending at the densest region of the stellar core) are reviewed. Apart from a broad set of baryonic EOSs, strange quark matter, and even more exotic (abnormal and Q-matter) EOSs are considered. Results of calculations of Mmax for non-rotating neutron stars and exotic compact stars are reviewed, with particular emphasis on the dependence on the dense-matter EOS. Rapid rotation increases Mmax, and this effect is studied for both neutron stars and exotic stars. Theoretical results are then confronted with measurements of masses of neutron stars in binaries, and the consequences of such a confrontation and their possible impact on the theory of dense matter are discussed.