C99 Terms, definitions, and symbols (annotated)

整理一下C99在Terms, definitions, and symbols提到的一些名詞定義的重點整理,總共有19個。

3.1 access

在標準中提到的access 即是對object存取,read or modify。這裡modify包含對object存入相同的值

‘Modify’ includes the case where the new value being stored is the same as the previous value

另外是如果Expressions沒有被evaluate就沒有access(例如short circuit evaluation)

Expressions that are not evaluated do not access objects.

3.2 alignment

alignment requirement that objects of a particular type be located on storage boundaries with addresses that are particular multiples of a byte address

這邊alignment指的是特定型態object的位址,例如word boundary(address divisible by 4 or 8), alignment requirement這部分是跟機器架構有關,也跟指令有關。 x86大部分的指令data access資料的位址不一定要alignment,如果沒有alignment在boundary,存取效率會比較差,但例如i386的__float128就要求一定要對齊16 byte boundary

This entry was posted in C Language. Bookmark the permalink.

Leave a Reply