kaifeng added the comment:
Sorry for the later update.
Valgrind shows there is no memory leak (see attached valgrind.log).
The following code,
while True:
XML(gen_xml())
has an increasing memory usage in the first 5~8 iterations, and waves around a
constant level afterwards.
So
kaifeng added the comment:
I applied your patch to Python 3.2, also I added a function call to
'malloc_trim' via ctypes, as you can see in issue11849_test2.py.
In fact I have a daemon written in Python 2.5, parsing an XML of size 10+ MB
every 5 minutes, after 16+ hours running, t
kaifeng added the comment:
Found a minor defect of Python 3.2 / 3.3: line 1676 of xml/etree/ElementTree.py
was:
del self.target, self._parser # get rid of circular references
should be:
del self.target, self._target, self.parser, self._parser # get rid of
circular references
While it
kaifeng added the comment:
I added 'malloc_trim' to the test code and rerun the test with Python 2.5 / 3.2
on CentOS 5.3. The problem still exists.
*** Python 2.5.5 final
--- PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
0 2567 pts/0S+ 0:00 0
kaifeng added the comment:
Python 3.2 On Linux (CentOS 5.3)
*** Python 3.2.0 final
--- PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
0 15116 pts/0S+ 0:00 1 1316 11055 6452 0.6 python3.2
issue11849_test.py
1 15116 pts/0S+ 0:02 1 1316 53155
Kaifeng Zhu added the comment:
Yes. Just tested with Python 2.7 and 3.2 in Windows 7, the memory usage is
still unexpected high after 'Done' is printed.
--
___
Python tracker
<http://bugs.python.o
New submission from Kaifeng Zhu :
I'm using xml.etree.ElementTree to parse large XML file, while the memory keep
increasing consistently.
You can run attached test script to reproduce it. From 'top' in Linux or 'Task
Manager' in Windows, the memory usage of p