On 6/14/10 5:25 PM, Øyvind Hvidsten wrote:
> It would seem Debian Squeeze uses that option as default.
> Without it, I get a whole ton of warnings, and errors about "free",
> "malloc" and "realloc" being defines multiple times.
> 
> Have you tried to reproduce the problem outside of Valgrind? Just
> running the examples and looking at the memory usage? I've tried on two
> different machines now, with bash 4.1.5 and 3.2.25, and it happens on
> both, though it does seem to happen a lot faster on 4.1.5. Other people
> in #bash have reproduced it too.
> 
> By the way it seems one of my slashes were removed at some point. The
> testcases need to be run in the / directory, or the command has to be:
> while read line; do test=${line#\ }; done < <(ls -lR /)
> ..in order to generate enough input to reproduce the issue.

There's no evidence that bash frees a lot of memory when the program
ends (valgrind would report that, too), nor that it makes a lot of
allocations that are not quickly followed by frees.  You may have hit
on an allocation pattern that the system malloc handles badly, or it
might be the case that there is a memory leak that I can't detect with
the tools I have.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to