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

FreeBSD系统libdtrace模块中分配内存代码的改动

Pedro Giffuni日前将FreeBSD系统的libdtrace模块中的分配内存代码做了修改(commit ID:https://svnweb.freebsd.org/base?view=revision&revision=296816):以前是malloc一块内存,然后用bzero将这块内存清0;现在统一用calloc函数来完成上述操作。Pedro Giffuni本人的说法是“calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).”。下面就看illumos社区是否会做同样的改动了。

参考资料:
Uses for calloc in libdtrace

 

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.