Out of memory

Historically, the out-of-memory condition was more common than it is now, since early 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 less frequent.

[citation needed] As predicted by 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.

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 or the end-user has disabled them.

For example, the C standard function for allocating memory, malloc(), will return NULL and a well-behaved application should handle this situation.

Out of memory screen display on system running Debian 12 (Linux kernel 6.1.0-28)