When you need more memory than your computer has, simply use a swap file:

# dd if=/dev/zero of=/tmp/swapfile bs=1MiB count=$((32*1024))
# chmod 600 /tmp/swapfile
# mkswap /tmp/swapfile
# swapon /tmp/swapfile

When the swap file is no longer needed:

# swapoff /tmp/swapfile
# shred --random-source=/dev/urandom -u /tmp/swapfile

The last step is optional, it depends on your file system and paranoia ;)