Next: , Previous: , Up: Message specifications   [Contents][Index]


Item size

Item size

The message size is represented by the <item_size> nonterminal. It can be empty or expressed in one of two other ways:

<item_size> ::= <empty>
| <expr> <data_multiplier>
| <data_type> SIZED

A <data_multiplier> is a scaling factor that converts a unitless number into a number of bytes. The following are the valid possibilities for <data_multiplier> and the number of bytes by which they multiply <expr>:

<data_multiplier> ::= BIT | BYTE | HALFWORD | WORD | INTEGER | DOUBLEWORD | QUADWORD | PAGE | KILOBYTE | MEGABYTE | GIGABYTE

BIT 1/8 bytes, rounded up to the nearest integral number of bytes

BYTE 1 byte

HALFWORD 2 bytes

WORD 4 bytes

INTEGER the number of bytes in the backend’s fundamental integer type

DOUBLEWORD 8 bytes

QUADWORD 16 bytes

PAGE the number of bytes in an operating-system page

KILOBYTE 1,024 bytes

MEGABYTE 1,048,576 bytes

GIGABYTE 1,073,741,824 bytes


A <data_type> is an “atomic” unit of data. It can be any of the following:

<data_type> ::= BYTE | HALFWORD | WORD | INTEGER | DOUBLEWORD | QUADWORD | PAGE

BYTE 1 byte

HALFWORD 2 bytes

WORD 4 bytes

INTEGER the number of bytes in the backend’s fundamental integer type

DOUBLEWORD 8 bytes

QUADWORD 16 bytes

PAGE the number of bytes in an operating-system page

Hence, valid <item_size>s include, for example, ‘16 MEGABYTE’ or ‘PAGE SIZED’. Empty <item_size>s are equivalent to ‘0 BYTE’. Note that INTEGER varies in size based on the backend, backend compiler, and CPU architecture but is commonly either 4 or 8 bytes; PAGE varies in size from operating system to operating system; each of the other <data_type>s has a fixed size, as indicated above.


Next: , Previous: , Up: Message specifications   [Contents][Index]

Scott Pakin, pakin@lanl.gov