cfree is a Linux kernel module that allows the user to clear portions of the buffer cache. This could be useful for filesystem testing, where the user would want the buffer cache to be cleared between runs of the test.
If you wish to use cfree on a Linux 2.6 Kernel, get this patch to upgrade cfree-1.1 to cfree-2.0. This patch was written by Mathieu Desnoyers, and I have not had an opportunity to test it.
Also, there is a web interface to the CVS repository.
Some people asked me how to contribute to my efforts. Well, feel free to donate whatever you want.
I will personally donate 5% of all money donated (after Paypal transaction fees) to the Avon Walk for Breast Cancer.
tar -xzvf cfree-1.0.tar.gz
make -DDEBUG cfree_front
To load into the kernel (as root):
To clear the buffer cache below /var/spool/mail (as root):
echo -n c /var/spool/mail > /proc/cfree
To clear the buffer cache below /var/spool/mail while ensuring that nobody is actively writing to that location (as root):
To remove the module from memory (as root):
Support and Credits