The spatial, infinitely small oscillations of a viscous two-layer heavy fluid in a vessel of arbitrary shape are investigated. The Reynolds number is assumed to be large (low viscosity) which enables one to use the ideas of boundary-layer theory and the Krylov-Bogolyubov averaging method. Boundary-layer theory is used as in earlier publications in which linear problems on the oscillations of a compressible medium with a low viscosity were solved. Approximation formulae are derived for the velocity components of the fluid and, also, for the damping coefficient and the correction to the frequency of the free oscillations of an ideal fluid. Like the analogous quantities, these quantities are expressed in terms of the eigenvalues and eigenfunctions of the corresponding problem on the oscillations of an ideal fluid. It is found that the damping coefficient and the correction to the frequency, even in the first approximation with respect to the small parameter, also depend, as in the two-dimensional case, on the loss of energy in the boundary layers close to the boundary of separation of the two-layer fluid. In the case of a homogeneous fluid in an open vessel, the energy losses close to the free surface of the fluid are asymptotically small compared with the losses close to the walls of the vessel. Expressions for the damping coefficient and the correction to the frequency of the vibrations for vessels with the form of a rectangular parallelepiped and a circular cylinder are given as examples.