Tuesday, February 20, 2007

To flush unused memory on Linux

Original source : http://www.hdfgroup.org/HDF5/faq/linux-mem.html

% dd if=/dev/zero of=junk bs=10MB count=200 #generate a 2000MB file
% # by now top will show not much free memory left.
% rm junk

You will then see a big jump of free memory because the data in the dirty buffers is no longer valid and the memory is free for other use.

Post a Comment