memory leakage

farajian amin amin_o_city at yahoo.com
Wed Feb 10 10:04:44 UTC 2010


Dear All,

I have experienced a memory leakage when i use busybox-1.14.1 on Snapgear linux( for leon architecture) (kernel 2.6.21.1).  I am not quite sure that if this is a busybox problem or kernel. The problem is as follows:

when we run the following script in busybox (ash) , the memory leak appears , and kill all mem at end.
---------------------------------
#!/bin/ash
while [ 1 ];
do
    GATEWAY=`iproute | grep default | awk '{print $3}'
done  

---------------------------------

Of course   we are not going to run this script in an endless loop without sleep, but we run it in specific periods of time.  
Note1: when we run "iproute | grep default " with out awk and GATEWAY  variable THERE IS NO memory leakage.
Note2: when we run "iproute | grep default | awk'{print$3}' without saving it in GATEWAY variable there is memory leakage.
Note3: when we run "iproute | grep default" and save its out put in GATEWAY variable THERE IS memory leakage.
 
we have checked busybox 1.15.3 and we faced the same problem.

Is it a kernel or busybox shell problem?

Thanks  in Advance.
Amin Farajian



      


More information about the busybox mailing list