If you run out of HDD space, Windows can shrink the swap file so you can keep using your computer. Likewise, if the swap file needs to grow, Windows has already partitioned the space off (although this is much less common with Windows 7's reduced RAM requirements, as well as new PC's high RAM size).
On a mac, OS X starts off with a relatively small swap file, and increases it as necessary. Hopefully there's space on the HDD for it.
What it is called in Windows is a Paging File. This ties into Virtual Address Space usage.
The concept people are having a difficult time grasping is
Virtual Address Space. The OS uses your hard drive along with your Ram to allow your programs to work.
Windows 7 64 bit uses 8
Terabytes of Virtual Address Space.
Whereas, the 32 bit uses 4 Gigabyte of Virtual Address Space.
From some information about OS X Lion,
Both Mac OS X and iOS include a fully-integrated virtual memory system that you cannot turn off; it is always on. Both system also provide up to 4 gigabytes of addressable space per 32-bit process. In addition, Mac OS X provides approximately 18 exabytes of addressable space for 64-bit processes. Even for computers that have 4 or more gigabytes of RAM available, the system rarely dedicates this much RAM to a single process.
To give processes access to their entire 4 gigabyte or 18 exabyte address space, Mac OS X uses the hard disk to hold data that is not currently in use. As memory gets full, sections of memory that are not being used are written to disk to make room for data that is needed now. The portion of the disk that stores the unused data is known as the backing store because it provides the backup storage for main memory.
Note it states
processes, that is your program running, is given 4 Gigabytes of virtual address space to play.
Also there is 18
Exabytes of Virtual Address Space in OS X. That is roughly 19
Terabytes. So you have plenty of space for your programs to work.
I know this sounds confusing but it how the OS works.
I think what the problem is that people associate RAM with storage space, aka hard drive. They are two different things. RAM is not storage. A hard drive is.