The memory requirements of individual data structures might get altered, depending upon the way packing is implemented in the compiler.
个别数据结构的内存需求可能会发生改变,这依赖于编译器中实现对齐的方式。
Visibility is more subtle; it deals with the vagaries of memory caching and compiler optimizations.
可见性则更为微妙;它要对付内存缓存和编译器优化的各种反常行为。
For example, a compiler may choose to optimize a loop index variable by storing it in a register, or the cache may delay flushing a new value of a variable to main memory until a more opportune time.
例如,编译器为了优化一个循环索引变量,可能会选择把它存储到一个寄存器中,或者缓存会延迟到一个更适合的时间,才把一个新的变量值存入主存。
应用推荐