This refers to swinging the cat-o-nine-tails.
If the room was too small toswing the whip and lash a poor soul, it was consdered "to small toswing a cat."