# "Cannot allocate memory" when upgrading

**URL:** <https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029>\
**Category:** Self-hosting\
**Tags:** server-resources\
**Created:** [May 11, 2016, 4:23am UTC](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029 "2016-05-11T04:23:42Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [May 24, 2016, 6:18pm UTC](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029/21 "2016-05-24T18:18:46Z")

</div>

Swap does not “take” RAM. Swap adds fake RAM from disk. When apps are out of memory, rather than failing due to being unable to allocate memory, they can use disk as a very slow alternative to memory.

It is the difference between failing completely with `out of memory` and slowing down for a little bit.

> **[Industry](https://www.computerworld.com/industry/)**
>
> Industry | News, analysis, features, how-tos, and videos

[https://www.centos.org/docs/5/html/5.2/Deployment\_Guide/s1-swap-what-is.html](https://www.centos.org/docs/5/html/5.2/Deployment_Guide/s1-swap-what-is.html)

---

_[View the full topic](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029)._
