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.


  • cfree-1.0.tar.gz

    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.

    Click to donate via Paypal


    To unpack:

    tar -xzvf cfree-1.0.tar.gz
    cd cfree-1.0

    To build:

    make -DDEBUG cfree_front

    To load into the kernel (as root):

    insmod ./cfree.o

    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):

    ./cfree_front /var/spool/mail

    To remove the module from memory (as root):

    rmmod cfree

    Support and Credits

    You may be interested in the Contact Info of Andrew de los Reyes, the author of Cfree.