[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep -f leaks large amount of memory
From: |
Justin Pryzby |
Subject: |
grep -f leaks large amount of memory |
Date: |
Sat, 10 Dec 2005 20:08:28 -0500 |
User-agent: |
Mutt/1.5.11 |
Please see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195719>
where it is documented that grep -f uses large amounts of memory, and
it is suggested that it might be leaking memory, causing linearly
increasing mem usage.
You can test with:
grep '^c...............' /usr/share/dict/words >/tmp/words
grep -f /tmp/words /usr/share/dict/words
The culprit seems to be
1024816 bytes in 2596 blocks are still reachable in loss record 18 of 18
at 0x1B90459D: malloc (vg_replace_malloc.c:130)
by 0x804C5EC: xmalloc (dfa.c:143)
by 0x804E9BB: build_state (dfa.c:2330)
by 0x804FC7E: dfaexec (dfa.c:2372)
by 0x8054DE2: EGexecute (search.c:402)
by 0x804A6C5: grepbuf (grep.c:732)
by 0x804B1A5: grepfile (grep.c:851)
by 0x804C39D: main (grep.c:1788)
(valgrind --leak-check=full --show-reachable=yes
./build-tree/grep-2.5.1/src/grep -f /tmp/words /usr/share/dict/words)
--
Clear skies,
Justin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep -f leaks large amount of memory,
Justin Pryzby <=