[Python-bugs-list] [Bug #127699] Memory leaks using imp.load_module
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 18 Jan 2001 19:43:40 -0800
Bug #127699, was updated on 2001-Jan-05 12:30
Here is a current snapshot of the bug.
Project: Python
Category: Python Interpreter Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: cgw
Assigned to : bwarsaw
Summary: Memory leaks using imp.load_module
Details: #!/usr/bin/env python
import os
import sys
import imp
print os.getpid()
sys.path.append("/tmp")
count = 0
while (count<1000):
modname = "testmod%s" % count
count = count + 1
filename = '/tmp/' + modname + '.py'
f = open(filename, 'w')
for x in range(10000):
f.write('x%s=%s\n'%(x,x))
f.close()
modinfo = imp.find_module(modname)
print 'loading', modname
m = apply(imp.load_module, ('testmod',) + modinfo)
## run "watch -n 1 ps up <pid>
## where <pid> is the pid printed out by this program
Follow-Ups:
Date: 2001-Jan-18 19:43
By: gvanrossum
Comment:
Barry...?!?!
-------------------------------------------------------
Date: 2001-Jan-07 15:32
By: fdrake
Comment:
Assigned to Barry since he's the memory leak expert (& has the right
tools).
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=127699&group_id=5470