Out of memory
Out of memory (OOM) is a state of computer operation (often undesired) where no additional memory can be allocated for use by programs or the operating system. Such a system will be unable to load any additional programs and since many programs may load additional data into memory during execution, these will cease to function correctly. This occurs because all available memory, including disk swap space, has been allocated.
Historically, the out of memory condition was more common than it is now—early computers (including personal computers) and operating systems were limited to small amounts of physical random-access memory (RAM) due to the inability of early processors to address large amounts of memory, as well as cost considerations. Since the advent of virtual memory opened the door for the usage of swap space, the condition is much more rare. This implies that modern software is often worse equipped than older software to deal with such a situation when it does, in fact, occur. Almost all modern programs expect to be able to allocate and de-allocate memory freely at run-time, and tend to fail in uncontrolled ways (crash) when that expectation is not met; older ones often allocated memory only once, checked whether they got enough to do all their work, and then expected no more to be forthcoming, thus either failing immediately with an “out of memory” error message, or working as expected.
Early operating systems lacked support for multitasking, such as MS-DOS. Programs were allocated physical memory that they could use as they needed. Physical memory is often a scarce resource, and when it was used up by applications—such as applications with Terminate and Stay Resident functionality—no further applications could be started until running applications were closed.
Modern operating systems provide virtual memory, in which processes are given a range of memory, but there is no guarantee that the memory corresponds to physical RAM. Virtual memory can be backed by physical RAM, a file via mmap, or swap space, and the operating system can move virtual memory pages around as it needs. Because virtual memory does not need to be backed by physical memory, exhaustion of it is rare, and usually there are other limits imposed by the operating system on resource consumption.
Due to Moore's law, the amount of physical memory in all computers has grown almost exponentially, although this is offset to some degree by programs and files themselves becoming larger. In most cases, a computer with virtual memory support where the majority of the loaded data resides on the hard disk would probably run so slowly due to excessive paging that it would be considered to have failed, prompting the user to close some programs or reboot. As such, an out of memory message is rarely encountered by applications with modern computers.
The typical OOM case in modern computers happens when the operating system is unable to create any more virtual memory, because all of its potential backing devices have been filled. Operating systems such as Linux will attempt to recover from this type of OOM condition by terminating a low-priority process, a mechanism known as the OOM Killer, which is still vulnerable in some cases to memory leak.
Per-process memory limits
A system may limit the amount of memory each process may use. This is usually a matter of policy but it can also happen when the OS has a larger address space than is available at the process level. Some high-end 32-bit systems come with 8GB or more of system memory, even though any single process can only access 4GB of it in a 32-bit flat memory model.
A process that exceeds its per-process limit will have attempts to allocate further memory, for example with
malloc(), return failure. A well-behaved application should handle this situation gracefully; however, many do not. An attempt to allocate memory without checking the result is known as an "unchecked malloc".
Wikimedia Foundation. 2010.
Look at other dictionaries:
Memory leak — A memory leak, in computer science (or leakage, in this context), occurs when a computer program consumes memory but is unable to release it back to the operating system. In object oriented programming, a memory leak happens when an object is… … Wikipedia
memory — n. power of recalling 1) to jog smb. s memory 2) to commit smt. to memory 3) to slip smb. s memory (the date has slipped my memory) 4) to lose one s memory 5) an infallible; photographic; powerful; retentive; short memory 6) (med.) long term;… … Combinatory dictionary
Memory disambiguation — is a set of techniques employed by high performance out of order execution microprocessors that execute memory access instructions (loads and stores) out of program order. The mechanisms for performing memory disambiguation, implemented using… … Wikipedia
Memory dependence prediction — is a technique, employed by high performance out of order execution microprocessors that execute memory access operations (loads and stores) out of program order, to predict true dependences between loads and stores at instruction execution time … Wikipedia
Memory barrier — Memory barrier, also known as membar or memory fence or fence instruction, is a type of barrier and a class of instruction which causes a central processing unit (CPU) or compiler to enforce an ordering constraint on memory operations issued… … Wikipedia
Memory errors — Memory gaps and errors refer to the incorrect recall, or complete loss, of information in the memory system for a specific detail and/or event. Memory errors may include remembering events that never occurred, or remembering them differently from … Wikipedia
Memory Almost Full — Studio album by Paul McCartney Released 4 June 2007 … Wikipedia
Memory disorder — Memory can be defined as an organism s ability to encode, retain, and recall information. Disorders of memory can range from mild to severe, yet are all a result of damage to neuroanatomical structures; either in part or in full. This damage… … Wikipedia
Memory for the future — refers to the ability to use memory to picture and plan future events. It is a subcategory of mental time travel which Suddendorf and Corballis described to be the process that allows people to imagine both past and potential future events.… … Wikipedia
Memory — • Memory is the capability of the mind, to store up conscious processes, and reproduce them later with some degree of fidelity Catholic Encyclopedia. Kevin Knight. 2006. Memory Memory … Catholic encyclopedia