[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread
Antti Haapala
report at bugs.python.org
Tue Sep 20 01:48:15 EDT 2016
Antti Haapala added the comment:
The title of the issue is still wrong. As I noted before the problem is not with subprocess leaking 4K memory *always*. The issue comes from the fact that subprocess seems to leak 4K memory per individual thread. The test code to use is thus
def test():
check_output("true")
threading.Timer(1, test, ()).start()
test()
which will invoke subprocess always in a new thread. Using subprocess in a loop, or using the timer as above without subprocess will not increase memory usage.
I have changed the title accordingly
----------
title: The 'subprocess' module leaks memory when called in certain ways -> The 'subprocess' module leaks 4 kiB memory for each thread
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28165>
_______________________________________
More information about the Python-bugs-list
mailing list