HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers

Chapter 2 Storage and Alignment Comparisons

» 

Technical documentation

Complete book in PDF

 » Table of Contents

This chapter focuses on the different ways that internal data storage is allocated on various platforms.

In the following discussions, 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 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.

NOTE: As of the C compiler release 11.00, HP C supports a 64-bit data model in which the long and pointer data types are 64-bits long. In the 32-bit model, the long and pointer data types are the same size as the int data type—32 bits. In this chapter and throughout the HP C documentation, where differences between these two modes occur, they are noted. The term used to specify the 64-bit mode in which the long and pointer types are 64-bits is LP64, and the term for 32-bit mode in which the int, long and pointer types are 32-bits is called ILP32.
© Hewlett-Packard Development Company, L.P.