Lines Matching full:memory
7 The memory management in Linux is a complex system that evolved over the
9 systems from MMU-less microcontrollers to supercomputers. The memory
18 Virtual Memory Primer
21 The physical memory in a computer system is a limited resource and
22 even for systems that support memory hotplug there is a hard limit on
23 the amount of memory that can be installed. The physical memory is not
29 All this makes dealing directly with physical memory quite complex and
30 to avoid this complexity a concept of virtual memory was developed.
32 The virtual memory abstracts the details of physical memory from the
34 physical memory (demand paging) and provides a mechanism for the
37 With virtual memory, each and every memory access uses a virtual
39 writes) from (or to) the system memory, it translates the `virtual`
41 memory controller can understand.
43 The physical system memory is divided into page frames, or pages. The
49 Each physical memory page can be mapped as one or more virtual
52 memory address. The page tables are organized hierarchically.
69 The address translation requires several memory accesses and memory
74 large memory working set will experience performance hit because of
77 Many modern CPU architectures allow mapping of the memory pages
85 memory with the huge pages. The first one is `HugeTLB filesystem`, or
88 the memory and mapped using huge pages. The hugetlbfs is described at
94 the system memory should and can be mapped by the huge pages, THP
103 Often hardware poses restrictions on how different physical memory
105 all the addressable memory. In other cases, the size of the physical
106 memory exceeds the maximal addressable size of virtual memory and
107 special actions are required to access portions of the memory. Linux
108 groups memory pages into `zones` according to their possible
109 usage. For example, ZONE_DMA will contain memory that can be used by
110 devices for DMA, ZONE_HIGHMEM will contain memory that is not
114 The actual layout of the memory zones is hardware dependent as not all
121 Many multi-processor machines are NUMA - Non-Uniform Memory Access -
122 systems. In such systems the memory is arranged into banks that have
125 constructs an independent memory management subsystem. A node has its
134 The physical memory is volatile and the common case for getting data
135 into the memory is to read it from files. Whenever a file is read, the
143 Anonymous Memory
146 The `anonymous memory` or `anonymous mappings` represent memory that
149 call. Usually, the anonymous mappings only define virtual memory areas
163 memory allocated by user space processes etc.
166 memory management. The pages that can be freed at any time, either
170 reclaimable pages are page cache and anonymous memory.
176 reclaimed. For instance, in-memory caches of filesystem metadata can
178 discard them from the main memory when system is under memory
181 The process of freeing the reclaimable physical memory pages and
184 of the system. When the system is not loaded, most of the memory is free
189 asynchronously scan memory pages and either just free them if the data
191 device (remember those dirty pages?). As memory usage increases even
194 until enough memory pages are reclaimed to satisfy the request.
199 As the system runs, tasks allocate and free the memory and it becomes
200 fragmented. Although with virtual memory it is possible to present
202 necessary to allocate large physically contiguous memory areas. Such
204 buffer for DMA, or when THP allocates a huge page. Memory `compaction`
206 from the lower part of a memory zone to free pages in the upper part
212 daemon or synchronously as a result of a memory allocation request.
217 It is possible that on a loaded machine memory will be exhausted and the
218 kernel will be unable to reclaim enough memory to continue to operate. In
223 enough memory will be freed to continue normal operation.