On 2010-06-10 21:29, Vivien Raoul wrote: > Actually, I'm not sure of what I did ; I couldn't apply the patch with > "patch", and I made the changes manually ; but it seems that all the free() > are in the #if 0 block. > What is exactly your patch supposed to do ?
If ClamAV is built with memory pool support (which by default it is on Linux), then there is no point in trying to free each individual node from the tree (which can be hundreds of thousands). Instead they will be all freed by the mpool_destroy(). My guess is that the individual frees need to bring back some data from the swap, before actually freeing it. And this is done for each node, so it takes a while if you have limited memory, and a slow disk. How fast is "really fast" though? Best regards, --Edwin _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml