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
> 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
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
* 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
* 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
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
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