Re:

2014-07-20 Thread Tran Thuan
Hi all,

I check that simple script by valgrind.

root@linux-7qs3:[workspace] [] $ valgrind --leak-check=full ./script
==2274== Memcheck, a memory error detector
==2274== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2274== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==2274== Command: ./script
==2274==
^C==2274==
==2274== HEAP SUMMARY:
==2274== in use at exit: 41,631 bytes in 1,520 blocks
==2274==   total heap usage: 34,049 allocs, 32,529 frees, 715,258 bytes
allocated
==2274==
==2274== LEAK SUMMARY:
==2274==definitely lost: 0 bytes in 0 blocks
==2274==indirectly lost: 0 bytes in 0 blocks
==2274==  possibly lost: 0 bytes in 0 blocks
==2274==still reachable: 41,631 bytes in 1,520 blocks
==2274== suppressed: 0 bytes in 0 blocks
==2274== Reachable blocks (those to which a pointer was found) are not
shown.
==2274== To see them, rerun with: --leak-check=full --show-reachable=yes
==2274==
==2274== For counts of detected and suppressed errors, rerun with: -v
==2274== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)

As my guess, the valgrind report no memory leak.
Any way, I would like to close this topic. Thank you for your support so
far.

*Best Regards,*
*Thuan*


On Wed, Jul 16, 2014 at 8:26 PM, Chris Down ch...@chrisdown.name wrote:

 Hi Tran,

 I think you've misunderstood the intent of Chet's reply. Nobody disagrees
 that the RSS should not increase. The reason that you're being asked for
 valgrind output is because the problem has yet to be reproduced, and the
 valgrind output might shed some light on where the problem lies, since
 others are not able to reproduce the problem.



Re:

2014-07-16 Thread Tran Thuan
Hi Chet,

Thank you for your reply.
I try a very simple script as you can see, I don't think it need to check
by valgrind.
The RSS should not increase for running that script.

The OS used is OpenSUSE 64bit version 12.1
I don't have chance to check on MacOS or RHEL.

-- 
Thuan

On Wed, Jul 16, 2014 at 3:23 AM, Chet Ramey chet.ra...@case.edu wrote:

 On 7/14/14, 12:46 AM, Tran Thuan wrote:

  I wrote a simple loop as following:
 
 
 
  while true; do
 
  sleep 1
 
  echo hello
 
  done
 
 
 
  But the RSS (resident set size) continue increase. (Check by ps command)
 
  Is it possible a bug of bash? Could you please help me check it?

 I can't reproduce this on MacOS X or RHEL 5 using bash-4.2 and bash-4.3.
 You might try running your script using `valgrind' and seeing what that
 tells you.

 Chet

 --
 ``The lyf so short, the craft so long to lerne.'' - Chaucer
  ``Ars longa, vita brevis'' - Hippocrates
 Chet Ramey, ITS, CWRUc...@case.edu
 http://cnswww.cns.cwru.edu/~chet/



[no subject]

2014-07-14 Thread Tran Thuan
Hi team,



I am a user of bash.

Could you help explain this?

I wrote a simple loop as following:



while true; do

sleep 1

echo hello

done



But the RSS (resident set size) continue increase. (Check by ps command)

Is it possible a bug of bash? Could you please help me check it?

I try on bash version 3.2.51 and 4.2.10. The result is same.

-- 
Thuan