Linux maintains a dynamically managed area in memory, a page cache, where new pages requested by processes are inserted, and from which pages are deleted when they’re no longer needed. If any pages marked for deletion have been modified, they’re rewritten to the disk—a page corresponding to a file mapped into memory is rewritten to the file and a page corresponding to the data is saved on a swap device.