Space-charge effects in low-energy proton synchrotrons