Python内存泄漏?

Python内存泄漏?,第1张

Python内存泄漏

Python源代码中有一个完整的README.valgrind,它解释了尝试将Valgrind与Python结合使用的各种注意事项

http://svn.python.org/projects/python/trunk/Misc/README.valgrind

Python uses its own small-object allocation scheme on top of malloc,called PyMalloc.Valgrind may show some unexpected results when PyMalloc is used.Starting with Python 2.3, PyMalloc is used by default.  You can disablePyMalloc when configuring python by adding the --without-pymalloc option.If you disable PyMalloc, most of the information in this document andthe supplied suppressions file will not be useful.  As discussed above,disabling PyMalloc can catch more problems.If you use valgrind on a default build of Python,  you will seemany errors like:        ==6399== Use of uninitialised value of size 4        ==6399== at 0x4A9BDE7E: PyObject_Free (obmalloc.c:711)        ==6399== by 0x4A9B8198: dictresize (dictobject.c:477)These are expected and not a problem.


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5034993.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-15
下一篇 2022-11-15

发表评论

登录后才能评论

评论列表(0条)

保存