17 Oct
2009
17 Oct
'09
7:36 p.m.
On Linux, to clear large regions of memory, the best way seems to be madvise(MADV_DONTNEED). Indeed, the previous trick of reading /dev/zero does not seem to have the correct effect of lazily-allocating pages on all Linux systems (e.g. bigdog-vm1). Note that this usage of madvise() is purely Linux-specific.
Note that bigdogvm1 is a vm, it might behave differently...