Yes, you can make a swap file. Use dd
to create an empty file (copy from /dev/zero to the appropriate destination) and mkswap
to make a swap area on it. List the file in /etc/fstab as if it were a swap partition, and activate it with:
See the various man-pages for more.