Date: Tue, 1 Jul 1997 19:24:05 +0300 (IDT) From: Eli Zaretskii To: Molnar Laszlo cc: djgpp-workers AT delorie DOT com, Daisuke Aoyama Subject: Re: Memory leak in bash In-Reply-To: <33B917F7.45B3326B@cdata.tvnet.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk I have two comments about this: 1) Whatever the reasons for this phenomenon, it also exists in the official port on SimTel.NET, so it's not new in bashb9. 2) Why are you so sure it's a memory leak? It can be just a result of known deficiencies in `malloc' and friends. The fact that Bash requests more and more core from the DPMI host doesn't necessarily mean that it itself leaks memory (although it might). On Tue, 1 Jul 1997, Molnar Laszlo wrote: > Hi Workers! > > I think I've found a bug in the latest bash (bashb9.zip). > When I run the file test0.sh with "sh test0.sh", I get: > > DPMI memory available: 22923 Kb > DPMI swap space available: 129297 Kb > DPMI memory available: 22911 Kb > DPMI swap space available: 129309 Kb > DPMI memory available: 22911 Kb > DPMI swap space available: 129309 Kb > DPMI memory available: 22911 Kb > DPMI swap space available: 129309 Kb > DPMI memory available: 22903 Kb > DPMI swap space available: 129317 Kb > DPMI memory available: 22887 Kb > DPMI swap space available: 129333 Kb > DPMI memory available: 22811 Kb > DPMI swap space available: 129217 Kb > DPMI memory available: 22491 Kb > DPMI swap space available: 129025 Kb > DPMI memory available: 21235 Kb > DPMI swap space available: 128617 Kb > DPMI memory available: 16235 Kb > DPMI swap space available: 127345 Kb > DPMI memory available: 119251 Kb > DPMI swap space available: 0 Kb > > As you can see at the last step all of my 22 MB physical memory is full. > Why is this? > > bye, Laszlo > > ps: I've found this problem in perl5.004's Configure script. > > Here are the 3 test files: > > *--test0.sh----* > go32-v2 | grep DPMI > > for i in 1 2 3 4 5 6 7 8 9 10 > do > . ./test1.sh # if you change this line to "sh ./test1.sh" > go32-v2 | grep DPMI # then there is no problem! > done > *--eof---------* > > *--test1.sh----* > . ./test2.sh > > cat >x < blah-blah > ENDEND > *--eof---------* > > *--test2.sh----* > cat >x < blah-blah > ENDEND > *--eof---------* > >