HP C Programmer's Guide (92434-90009)

Chapter 2 13
Storage and Alignment Comparisons
2 Storage and Alignment Comparisons
This chapter focuses on the different ways that internal data storage is allocated on
various platforms and discusses the HP_ALIGN pragma which you can use to overcome
these differences.
The storage and alignment rules of HP C on the HP 9000 Series 700/800 are compared
with those of other systems. (Note that the storage and alignment rules on the HP 3000
Series 900 are the same as those on the HP 9000 Series 700/800.)
Data storage refers to the size of data types. Data alignment refers to the way a system
or language aligns data structures in memory. Data type alignment and storage
differences can cause problems when moving data between systems that have different
alignment and storage schemes. These differences become apparent when data within a
structure is exchanged between systems using files or inter-process communication.
The storage and alignment rules for the following systems are compared:
HP C on the HP 9000 Series 700/800.
HP C on the HP 9000 Series 300/400.
HP Apollo Series 3000/4000.
HP Apollo Series 10000.
CCS/C on the HP 1000.
VAX/VMS C.