Desktop OSes usually have this enabled by default. These articles explain it better than I could. Basically, it's why you don't get reloads on Windows and Mac unlike on iOS.
Your Mac comes with a set amount of physical memory applications can use.
www.howtogeek.com
I was asked recently about the Mac OS X swapfile, specifically how to disable Mac OS X swapping entirely. I decided I will take this opportunity to talk a bit about Mac virtual memory (swap), it…
osxdaily.com
Essentially, Windows and MacOS use a virtual memory management system. This method uses disk space as an extension of system memory.
In very simplistic terms, what happens is this:
When an app requires memory, data that is least used in memory is paged out to disk (a swap file or paging file). Then that memory is allocated to the requesting app for use.
When another app comes along and needs memory, contents of least used memory is paged to disk and that memory space is reallocated to the new app. This is called a virtual memory management system and was implemented by IBM back in the 360/370 mainframe days back in the 1960's.
All mainframe (IBM) and supermini systems (Wang VS, DEC VAX, DataPoint etc.) used this management system. Windows and Mac use this method as well.
Your processor can address more memory than is physically installed in your computer, so the virtual memory management system extends addressable memory to the disk via paging and swap files.
Now, having said all that, I am not an expert on iOS, but i would suspect it uses some variation of this memory management scheme.
EDIT -
Both OS X and iOS include a fully-integrated virtual memory system that you cannot turn off; it is always on. Both systems also provide up to 4 gigabytes of addressable space per 32-bit process. In addition, 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.
Guidelines for improving the performance of memory-related code.
developer.apple.com