JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris 64-bit Developer's Guide
search filter icon
search icon

Document Information

Preface

1.  64-bit Computing

2.  When to Use 64-bit

3.  Comparing 32-bit Interfaces and 64-bit Interfaces

4.  Converting Applications

5.  The Development Environment

6.  Advanced Topics

SPARC V9 ABI Features

Stack Bias

Address Space Layout of the SPARC V9 ABI

Placement of Text and Data of the SPARC V9 ABI

Code Models of the SPARC V9 ABI

AMD64 ABI Features

Address Space Layout for amd64 Applications

Alignment Issues

Interprocess Communication

ELF and System Generation Tools

/proc Interface

Extensions to sysinfo(2)

libkvm and /dev/ksyms

libkstat Kernel Statistics

Changes to stdio

Performance Issues

64-bit Application Advantages

64-bit Application Disadvantages

System Call Issues

What Does EOVERFLOW Mean?

Beware ioctl()

A.  Changes in Derived Types

B.  Frequently Asked Questions (FAQs)

Index

Alignment Issues

There is one additional issue around the alignment of 32-bit long long elements in data structures; i386 applications only align long long elements on 32-bit boundaries, while the amd64 ABI places long long elements on 64-bit boundaries potentially generating wider holes in the data structures. This is different to SPARC where 32-bit or 64-bit, long long items were aligned on 64-bit boundaries.

The following table shows the data type alignment for the designated architectures.

Table 6-2 Data Type Alignment

Architecture
long long
double
long double
i386
4
4
4
amd64
8
8
16
sparcv8
8
8
8
sparcv9
8
8
16

Although code might already appear to be LP64 clean on SPARC systems, the alignment differences might produce problems when copying data structures between 32-bit and 64-bit programming environments. These programming environments include device driver ioctl routines, doors routines or other IPC mechanisms. Alignment problems can be avoided by careful coding of these interfaces, and by judicious use of the #pragma pack or _Pack directives.