[Ironpython-users] Memory Leak and Lightweight Scopes
Markus Schaber
m.schaber at 3s-software.com
Wed Nov 16 17:06:07 CET 2011
Hi,
Von: Markus Schaber
>[Memory Leaks]
I now created a smaller stand-alone testcase simulating our environment, and isolated the following cases:
- using Python.SetTrace(engine, delegate) leaks about 165k per script invocation.
- importing the warning module from the hosting environment leaks about 1.4 M per script run.
- importing the os module from the script also leaks about 1.4M per script.
- Doing both imorts also leaks about 1.4M per script(!).
- Combining all three of the above leads to an OutOfMemory Exception after about 331 cycles, boiling down to a leak of ~5MB per script run!
- Doing none of the above (only print) apparently creates a leak-free program.
I attached the test program. For the test runs above, I compiled it for .NET 4.0 and target "x86", as our production app also runs in that environment (.NET 4.0 and 32-bit only).
I'll do further investigations (like memory dumping) tomorrow.
Best regards
Markus Schaber
--
___________________________
We software Automation.
3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50
Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects
Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Program.cs
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20111116/63366ee6/attachment.ksh>
More information about the Ironpython-users
mailing list