Following are some commonly mentioned memory related terminologies:
- Main memory: Also referred to as physical memory, this describes the fast data storage area of a computer, commonly provided as DRAM.
- Virtual memory: An abstraction of main memory that is (almost) infinite and non-contended. Virtual memory is not real memory.
- Resident memory: Memory that currently resides in main memory.
- Anonymous memory: Memory with no file system location or path name. It includes the working data of a process address space, called the heap.
- Address space: A memory context. There are virtual address spaces for each process, and for the kernel.
- Segment: An area of virtual memory flagged for a particular purpose, such as for storing executable or writeable pages.
- Instruction text: Refers to CPU instructions in memory, usually in a segment.
- OOM: Out of memory, when the kernel detects low available memory.
- Page: A unit of memory, as used by the OS and CPUs. Historically it is either 4 or 8 Kbytes. Modern processors have multiple page size support for larger sizes.
- Page fault: An invalid memory access. These are normal occurrences when using on-demand virtual memory.
- Paging: The transfer of pages between main memory and the storage devices.
- Swapping: Linux uses the term swapping to refer to anonymous paging to the swap device (the transfer of swap pages). In Unix and other operating systems, swapping is the transfer of entire processes between main memory and the swap devices. This book uses the Linux version of the term.
- Swap: An on-disk area for paged anonymous data. It may be an area on a storage device, also called a physical swap device, or a file system file, called a swap file. Some tools use the term swap to refer to virtual memory (which is confusing and incorrect).
Virtual Memory
Virtual memory is an abstraction that provides each process and the kernel with its own large, linear, and private address space. It simplifies software development, leaving physical memory placement for the operating system to manage. It also supports multitasking (virtual address spaces are separated by design) and oversubscription (in-use memory can extend beyond main memory).

Paging
Paging is the movement of pages in and out of main memory, which are referred to as page-ins and page-outs, respectively.
File System Paging: File system paging is caused by the reading and writing of pages in memory-mapped files. This is normal behavior for applications that use file memory mappings (mmap(2)) and on file systems that use the page cache
Anonymous Paging (Swapping): Anonymous paging involves data that is private to processes: the process heap and stacks. It is termed anonymous because it has no named location in the operating system (i.e., no file system path name). Anonymous page-outs require moving the data to the physical swap devices or swap files. Linux uses the term swapping to refer to this type of paging.
Demand Paging
Operating systems that support demand paging (most do) map pages of virtual memory to physical memory on demand. This defers the CPU overhead of creating the mappings until they are actually needed and accessed, instead of at the time a range of memory is first allocated.

If the mapping can be satisfied from another page in memory, it is called a minor fault. Page faults that require storage device access (not shown in this figure), such as accessing an uncached memory-mapped file, are called major faults.
States of a page in virtual memory:
A. Unallocated
B. Allocated, but unmapped (unpopulated and not yet faulted
C. Allocated, and mapped to main memory (RAM)
D. Allocated, and mapped to the physical swap device (disk)
- Resident set size (RSS): The size of allocated main memory pages (C)
- Virtual memory size: The size of all allocated areas (B + C + D)
Overcommit
Linux supports the notion of overcommit, which allows more memory to be allocated than the system can possibly store—more than physical memory and swap devices combined. It relies on demand paging and the tendency of applications to not use much of the memory they have allocated.
Process Swapping
Process swapping is the movement of entire processes between main memory and the physical swap device or swap file.
File System Cache Usage
It is normal for memory usage to grow after system boot as the operating system uses available memory to cache the file system, improving performance. The principle is: If there is spare main memory, use it for something useful.
Utilization and Saturation
Main memory utilization can be calculated as used memory versus total memory. Memory used by the file system cache can be treated as unused, as it is available for reuse by applications. If demands for memory exceed the amount of main memory, main memory becomes saturated.
Allocators
While virtual memory handles multitasking of physical memory, the actual allocation and placement within a virtual address space are often handled by allocators.
Shared Memory
Memory can be shared between processes. This is commonly used for system libraries to save memory by sharing one copy of their read-only instruction text with all processes that use it.
Proportional set size (PSS)
Private memory (not shared) plus shared memory divided by the number of users.
Working Set Size
Working set size (WSS) is the amount of main memory a process frequently uses to perform work.
Word Size
Processors may support multiple word sizes, such as 32-bit and 64-bit, allowing software for either to run. As the address space size is bounded by the addressable range from the word size, applications requiring more than 4 Gbytes of memory are too large for a 32-bit address space and need to be compiled for 64 bits or higher.