I've been playing with Linux RAMDISKs, as in the block device /dev/ram0. I understand that when I first start writing to one of these devices some RAM is allocated to it.
How do I free the memory used by, say, /dev/ram0? Put another way: how do I indicate to the Linux kernel that I'm done and it can reclaim whatever resources are held by /dev/ram0?
mkfs /dev/ram0and then mounted it, did some experiments (testing how my app copes with out of disk-space conditions) and unmounted it. But that doesn't free the memory that backs /dev/ram0. – RobM Aug 5 '11 at 19:42