There are two kinds of ram disk that you can set up in most Linux systems: tmpfs and ramfs. ramfs is very simple: it's dynamically allocated as you store files and remove them, and it will not go to swap. If you run out of memory in ramfs, you have run out of memory in your system, and bad things will happen.
tmpfs will go to swap if necessary, so it won't kill your system until it has allocated all the memory it can -- and, at mount time, you must specify a limit to the size that it can grow. You can be silly and specify a size larger than RAM + swap, but that's on you.
So the primary downside of tmpfs is having to decide up front how much memory it can use (at max -- it is also dynamically allocated/deallocated). But!
mount -o remount,limit=2G /mnt/mountpoint will reset that limit without wiping the current contents.