How do I deallocate a Linux RAMDISK, e.g. /dev/ram0?

Unless you format the ramdisk something along the lines of

mke2fs -m 0 /dev/ram0

The ramdisks themselves don't actually occupy any memory space.

If you do format and mount a ramdisk however, the only way that I remember doing is by using freeramdisk but that was a long long time ago.

Some other resources you might want to check out:

http://e2enetworks.com/2008/10/25/linux-in-memory-filesystems-tmpfs-vs-ramdisk/

http://www.vanemery.com/Linux/Ramdisk/ramdisk.html

http://www.linuxdoc.org/HOWTO/BootPrompt-HOWTO-3.html