¶ LDAP的内存泄露

2006-03-17 17:00

故事:
友人在折腾LDAP ,使用Python 的 Twisted 组件来开发时应用常常死亡, 怀疑Python的内存泄露,但是找不到证据……
结局:
找到高人delphj 运用内存分析工具:
/usr/ports/devel/valgrind> cat pkg-descr
Valgrind is a system for debugging and profiling un*x programs. With the tools
that come with Valgrind, you can automatically detect many memory management
and threading bugs, avoiding hours of frustrating bug-hunting, making your
programs more stable. You can also perform detailed profiling, to speed up and
reduce memory use of your programs.

The Valgrind distribution includes five tools: two memory error detectors, a
thread error detector, a cache profiler and a heap profiler. Several other
tools have been built with Valgrind.

Valgrind was ported to FreeBSD by Doug Rabson (http://www.rabson.org/).

WWW: http://valgrind.kde.org/

才发现是LDAP本身的问题: 每次RPC 的远程连接结束后,会泄露 32字节的内存! 晕哪!怪不得叫 LDAP, 因为很轻的连接情况下的确很不容易发觉,在当前内存动不动就上Gb的情况下…………

Python的虚拟机是非常坚固的!不要轻易怀疑吧……

Zen ,Python ,ldap ,computer


  • 动力源自::txt2tags
  • t2t渲染:: 2010-10-09 02:21:39

§ 写于: Fri, 17 Mar 2006 | 永久链接;源文: rdf ,rss ,raw | 分类: /techic §
[MailMe] [Print] Creative Commons License

作品Zoom.Quiet创作,采用知识共享署名-相同方式共享 2.5 中国大陆许可协议进行许可。 基于zoomquiet.org上的作品创作。