Both work with Linux's existing swapping mechanism. Swapping (called paging in Windows) is a way for the kernel to handle running low on available RAM. It chooses pages of memory that aren't in use right now and copies them to disk, then those blocks can be marked as free and reused for something else.