How to: RAM over-allocation
You cannot allocate more RAM than your machine has. The default is 3 Gigabytes: `-e RAM=3`.

If you are trying to allocate more RAM to the container than you currently have available, you may see an error like the following: `cannot set up guest memory 'pc.ram': Cannot allocate memory`. See also: [here](https://github.com/sickcodes/Docker-OSX/issues/188), [here](https://github.com/sickcodes/Docker-OSX/pull/189).

For example (below) the `buff/cache` already contains 20 Gigabytes of allocated RAM:

```console
[user@hostname ~]$ free -mh
               total        used        free      shared  buff/cache   available
Mem:            30Gi       3.5Gi       7.0Gi       728Mi        20Gi        26Gi
Swap:           11Gi          0B        11Gi
```

Clear the buffer and the cache:

```bash
sudo tee /proc/sys/vm/drop_caches <<< 3
```

Now check the RAM again:

```console
[user@hostname ~]$ free -mh
               total        used        free      shared  buff/cache   available
Mem:            30Gi       3.3Gi        26Gi       697Mi       1.5Gi        26Gi
Swap:           11Gi          0B        11Gi
```