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 <rep...@bugs.python.org> <http://bugs.python.org/issue28165> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com