HPlogo HP C/HP-UX Programmer's Guide: Workstations and Servers

Chapter 2 Storage and Alignment Comparisons

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

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 HP 9000 workstations and servers 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 workstations and servers.

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 workstations and servers

  • 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.

© Hewlett-Packard Development Company, L.P.