Hi,

we found there is a memory leak in ksh (in both latest stable 2012-08-01 and latest development version 2014-01-14).

The reproducer is following:

#################################################
#!/bin/ksh

function myFunction
{
  typeset toPrint="something"
  echo "${toPrint}"
}

TOPCOUNT=10000
print ${.sh.version}

pmap -x $$ |tail -1
for (( j=0; j<100; j++)); do
        start=$SECONDS

        for (( i=0; i<TOPCOUNT; i++)); do
                state=$(myFunction)
        done
        ((b=SECONDS-start))
        printf "%3.4f " $b
        pmap -x $$ |tail -1
done
#################################################

ksh eats more and more memory:

Version AIJM 93v- 2014-01-14
total kB          123468    2076     372
0.2329 total kB          123468    3180    1380
0.2049 total kB          123468    4132    2332
0.2042 total kB          123468    5008    3208
0.2034 total kB          127564    5964    4164
0.2007 total kB          127564    6932    5132

I've noticed that the latest tarball is in beta directory, not alpha. Is stable release close? Should we test it more thoroughly?

Michal
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to