We introduce a lattice model of glass transition in polymer globules. This
model exhibits ergodicity breaking in which the disjoint regions of phase s
pace do not arise uniformly, but as small chambers whose number increases e
xponentially with polymer density. Chamber sizes obey power law distributio
n, making phase space similar to a fractal foam. This clearly demonstrates
the importance of the phase space geometry and topology in describing any g
lass-forming system, such as semicompact polymers during protein folding.