Re: Severe memleak in sequence expressions?

2011-11-30 Thread Bob Proulx
Marc Schiffbauer wrote: > Greg Wooledge schrieb: > > Marc Schiffbauer wrote: > > > echo {0..1000}>/dev/null > > > > > > This makes my system starting to swap as bash will use several GiB of > > > memory. > > > > In my opinion, no. You're asking bash to generate a list of words from 0 > > to 1

Re: Severe memleak in sequence expressions?

2011-11-30 Thread Chet Ramey
On 11/30/11 5:30 PM, Marc Schiffbauer wrote: >> 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

Re: Severe memleak in sequence expressions?

2011-11-30 Thread Marc Schiffbauer
* Greg Wooledge schrieb am 30.11.11 um 14:28 Uhr: > On Wed, Nov 30, 2011 at 12:37:36AM +0100, Marc Schiffbauer wrote: > > echo {0..1000}>/dev/null > > > > This makes my system starting to swap as bash will use several GiB of > > memory. > > Brace expansion is just a short way of typing a long

Re: Severe memleak in sequence expressions?

2011-11-30 Thread Marc Schiffbauer
* 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

Re: Severe memleak in sequence expressions?

2011-11-30 Thread Greg Wooledge
On Wed, Nov 30, 2011 at 12:37:36AM +0100, Marc Schiffbauer wrote: > echo {0..1000}>/dev/null > > This makes my system starting to swap as bash will use several GiB of > memory. Brace expansion is just a short way of typing a longer list of words. If you type {0..9} bash still has to expand it

Re: Severe memleak in sequence expressions?

2011-11-30 Thread Chet Ramey
> 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 chun

Severe memleak in sequence expressions?

2011-11-30 Thread Marc Schiffbauer
Hi all, I think there is a severe memleak in bash. I had this effect with bash 4.2.10 (Ubuntu Linux) as well as bash 4.1.9 on Gentoo Linux. To make it short: echo {0..1000}>/dev/null This makes my system starting to swap as bash will allocate several GiB of memory. If I choose a way bigg