bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Severe memleak in sequence expressions?


From: Marc Schiffbauer
Subject: Re: Severe memleak in sequence expressions?
Date: Wed, 30 Nov 2011 23:30:35 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Chet Ramey schrieb am 30.11.11 um 14:23 Uhr:
> > Hi all,
> > 
> > I think there is a severe memleak in bash.
> 
> It's not a memory leak.  It might reveal a sub-optimal memory allocation
> pattern -- asking for an array with that many strings is going to gobble
> a lot of memory -- but it's not a leak in the sense that bash loses
> track of an allocated chunk.

Well, but how do you explain that:

mschiff@moe:~$ bash
mschiff@moe:~$ ps u $$
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mschiff  14156  5.2  0.1   8836  3692 pts/1    S    23:28   0:00 bash
mschiff@moe:~$ time echo {0..1000000}>/dev/null

real    0m2.307s
user    0m2.084s
sys     0m0.196s
mschiff@moe:~$ ps u $$
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
mschiff  14156 13.2  6.2 196272 191036 pts/1   S    23:28   0:02 bash
mschiff@moe:~$


-Marc
-- 
8AAC 5F46 83B4 DB70 8317  3723 296C 6CCA 35A6 4134



reply via email to

[Prev in Thread] Current Thread [Next in Thread]