On 1/7/14, 2:27 AM, toddbst...@gmail.com wrote: > Repeat-By: > These can all be demonstrated by running a script consisting of an > infinite loop which repeatedly executes any command utilizing any of the > above examples. Like this: > > #!/bin/bash > > while :; do > echo ${variable/pattern} > done > > The resident memory size will continually grow. This occurs on both > CentOS 6.5 (bash 4.1.2) and Fedora 20 (bash 4.2.45).
Have you run any of these through valgrind? I ran a few, and it did not report any leaks, at least on bash-4.3-rc1. The increase in memory size is probably from malloc getting memory from the kernel but not releasing it back to the kernel after bash calls free (giving memory back to the kernel is harder than you think). Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/