Hello,

* Nicolas François [Fri, Nov 14, 2008 at 08:45:57PM +0100]:
> grep is line-based, so I'm not really surprised it eats all the memory
> when it receives only zeroes.
> 
> What other "big file" did you tested this on?

A 2Gb swap file. It could be that the first newline in this file is
far from the beginning, I've deleted it since.

> For chkrootkit, I guess checking for fixed string (at least when we can
> expect long greps) is sufficient and would fasten it a lot.

It was in fact checking for fixed string when it nearly stopped my
machine, the invocation was `grep php'.

I see that since grep usually prints out matching lines, it needs to
allocate enough memory for the current line. Thanks for pointing that
out. I guess this bug becomes a wishlist bug against chkrootkit.

Regards,

Laurent.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to