【发布时间】:2011-09-18 15:08:34
【问题描述】:
好像posix_memalign让你选择一个自定义的alignment,但是什么时候需要呢?
malloc 已经在内部完成了对齐工作。
更新
我问这个的确切原因是因为我看到nginx这样做了,ngx_memalign(NGX_POOL_ALIGNMENT, size, log);,这里NGX_POOL_ALIGNMENT定义为16,nginxs.googlecode.com/svn-history/trunk/src/core/ngx_palloc.c
【问题讨论】: