Cache Line Alignment (Need clarification on article)

后端 未结 3 1159
青春惊慌失措
青春惊慌失措 2021-02-02 02:44

I\'ve recently encountered what I think is a false-sharing problem in my application, and I\'ve looked up Sutter\'s article on how to align my data to cache lines. He suggests t

3条回答
  •  悲哀的现实
    2021-02-02 03:06

    "You can't have arrays of size 0, so 1 is required to make it compile" - GNU C does allow arrays dimensioned as zero. See also http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Zero-Length.html

提交回复
热议问题