On Wed, Sep 12, 2007 at 12:02:46AM +0100, Gregory Stark wrote: > "Decibel!" <[EMAIL PROTECTED]> writes: > > > On Tue, Sep 11, 2007 at 02:49:28PM -0400, Jean-David Beyer wrote: > >> It is tricky for me to find a big enough file to test. I tried one of the > > > > dd if=/dev/zero of=bigfile bs=8192 count=1000000 > > On linux another useful trick is: > > echo 1 > /proc/sys/vm/drop_caches
The following C code should have similar effect...
/*
* $Id: clearmem.c,v 1.1 2003/06/29 20:41:33 decibel Exp $
*
* Utility to clear out a chunk of memory and zero it. Useful for flushing disk
buffers
*/
int main(int argc, char *argv[]) {
if (!calloc(atoi(argv[1]), 1024*1024)) { printf("Error allocating
memory.\n"); }
}
--
Decibel!, aka Jim Nasby [EMAIL PROTECTED]
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
pgpWoNVFef8hh.pgp
Description: PGP signature
