There are several independent variants of the tmpfs concept. One of the earliest was developed by
Sun Microsystems for SunOS, and other operating systems, such as the BSDs and Linux, provided their own.
SunOS SunOS 4 includes what is most likely the earliest implementation of tmpfs; it first appeared in SunOS 4.0 in late 1987, together with new orthogonal address-space management that allowed any object to be memory-mapped. The
Solaris directory was made a tmpfs file system by default starting with Solaris 2.1, released in December 1992. Output for the Solaris command will show
swap as the background storage for any tmpfs volume:
Linux tmpfs is supported by the
Linux kernel beginning in version 2.4 (January 4, 2001). Linux tmpfs (previously known as
shm fs) is based on the ramfs code used during bootup and also uses the
page cache, but, unlike ramfs, it supports swapping out less-used pages to swap space, as well as filesystem size and inode limits to prevent
out-of-memory situations (defaulting to half of physical RAM and half the number of RAM pages, respectively).
BSD 4.2BSD introduced MFS, a memory-based file system implemented by applying the existing
FFS disk filesystem to a virtual memory region. tmpfs, a memory filesystem implemented using conventional in-memory data structures to improve on the performance of MFS, was merged into the official
NetBSD source tree on September 10, 2005;{{cite web
FreeBSD has ported NetBSD's implementation, where it is available in 7.0 and later versions.{{cite web
DragonFly BSD has also ported NetBSD's implementation, where it is available in 2.5.1 and later versions.
OpenBSD ported NetBSD's tmpfs implementation as well, initially started by Pedro Martelletto and improved by many others. It was enabled in builds from December 17, 2013.{{cite web == Advantages ==