Linux BASH memory leak on stdio redirect
I have a memory leak somewhere, but it doesn't seem to be related to my program. I am making this bold expression based on the fact that once my program exits, either in the normal way, or crashed or intermittently, memory is not reclaimed. If my program was the culprit, I would assume the MMU would restore everything, but that doesn't seem to be the case.
The leak comes into play when I redirect stdout (in BASH version 2.05 or 4) to a file, as that's ok:
# my-program
but this is not the case:
# my-program > /mnt/sda1/log-output.txt
The speed at which I am typing on the screen is <2Kbps. (The file is on the USB keyboard).
Any ideas?
A related question is here .
+2
source to share