Development

共368篇文章。

How to make FreeBSD to permit several programs to play sound simutiously?

• Development

You may have noticed that FreeBSD by default does not allow many programs to play sound at same time. For instance, you generally can not hear GAIM sound when you are hearing MP3.

Fortunately, this can be resolved if you have read the documentations. Now I write here so you can also Google it :-)

Add a single line into /etc/sysctl.conf:

hw.snd.pcm0.vchans=16

Then, reboot (or if you are careful enough, shut down all programs that is using sound subsystem, then run /etc/rc.d/sysctl restart)

阅读全文… ( 本文约95字,阅读大致需要1分钟 )

AMD64 string function optimizations

• Development

So time comes that we should consider whether some of our string operations is not optimial and needs some operation. NetBSD seems to have done a lot of good work to make their MD layer better, and we should take these improvements if they are proven.

David O’Brien has pointed out that we should be careful on this, however, since some micro optimizations may hinder performance in a large scenario. With this concern in mind, I will redo some more benchmarks and request for -arch@’s idea before considering commiting the patchset. Currently, the NetBSD implementation of swab(2) is proven to be slower than the GCC generated code by about 25%. I will look into the assembly code generated to see whether I can help to solve this.

阅读全文… ( 本文约160字,阅读大致需要1分钟 )

BSD授权的自我保护

• Development

以前一直觉得BSD授权在某些污染型伪自由软件授权面前显得很被动——似乎他们可以任意地剽窃代码而阻止代码以BSD授权发布——然而仔细读来,BSD其实是一个有自我保护能力的授权,它的第一条条款:

阅读全文… ( 本文约384字,阅读大致需要1分钟 )