In order to save disk space, I want to have two OS installations share a single swap partition (a dual-boot). Is this a good idea?
It's possible. In fact, you can share the swap space between completely different operating systems, as long as you initialize the swap space when you boot. It used to be relatively common to share swap space between Linux and Windows, back when it represented a significant portion of your hard disk.
Two restrictions come to mind:
One side effect I can think of is:
You could lose data.
One of my friends have tried this. He has installed five or six distros in a single Hard drive.
The first primary partition is for GRUB and he is able to boot to all the distros. The second partition is swap. The third partition is an extended partition and each of the distros is installed into their own logical partitions.
All of the distros are booting and can hibernate. I think you just need to make sure and select the correct distro after resuming from hibernation.
So, on the basis of his experiment I should say YES. This is possible.
But i think it can break things. What if distro 2 wakes up and distro 1's resume file
is using up the swap partition, what's the next thing going to happen?