1 Star2 Stars3 Stars4 Stars5 Stars (还没有评分)
Loading...

DTrace动态变量泄露(dynamic variable drops)问题

在这个月的dtrace-discuss mailing list里,有人提到了动态变量泄露(dynamic variable drops)问题:http://www.listbox.com/member/archive/184261/2014/05/sort/time_rev/page/1/entry/2:5/20140505141710:5BA4F4A2-D481-11E3-ADF7-F8194C58CA13/。总结起来,就是像thread-local和associative array这样的变量,用完以后要记得释放(就是把变量置为0:self->var = 0),否则就会有泄露,这样终究就会用光这些资源。

关于这个问题,推荐大家看下面这两篇文章:http://constantin.glez.de/blog/2010/04/how-automatically-update-your-home-media-server-library-dtracehttp://constantin.glez.de/blog/2010/05/opensolaris-dtrace-home-media-servers-revisited。一个德国工程师写的如何用DTrace做一件很tricky的事。文章里提到了thread-local变量泄露的问题,很有意思。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.