I can't imagine the need ever coming about which is why the only way I know of to clear the IO cache is by rebooting.
Yeah I was afraid of that. I can not imagine a reason either but was just a question I had. I have read a bit on a suggested bug in the 2.4 kernel that has never been recognized by the kernel authors as a bug but states that "Out of Memory" errors are reported when an application tries to run and there is not enough free memory to support this process. This in turn would mean that the cached memory was not effectively being used like it is suppose to be.
I am running a 2.6 kernel however but was just doing some testing. I have noticed that I sometimes get Segfaults on my app when the cache memory is high but I attribute this to thread limits more than memory usage.
Speaking of which, whenever I reboot my system the ulimit for stack size gets reset to 10240 and I have to manually change it back to 1024 to get the number of threads required. Where would I change this so it would be a permanent change?