内存对齐指令

通常来说内存对齐很能提高速度的,使用如下指令在两个操作系统下面令内存对齐

#ifdef _WIN32
   typedef __declspec(align(16)) struct
#elif _LINUX
   typedef __attribute__((aligned(16))) struct
#endif

这里有一篇讲得很好的文章
http://www.cnblogs.com/flying_bat/archive/2007/11/02/946960.html
posted @ 2007-11-02 14:42  至尊王者  阅读(376)  评论(0编辑  收藏  举报