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


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)


Interprocess Communication

The following interprocess communication (IPC) primitives continue to work between 64-bit and 32-bit processes:

Although all these primitives allow interprocess communication between 32-bit and 64-bit processes, you might need to take explicit steps to ensure that data being exchanged between processes is correctly interpreted by all of them. For example, two processes sharing data described by a C data structure containing variables of type long cannot do so without understanding that a 32-bit process views this variable as a 4–byte quantity, while a 64-bit process views this variable as an 8–byte quantity.

One way to handle this difference is to ensure that the data has exactly the same size and meaning in both processes. Build the data structures using fixed-width types, such as int32_t and int64_t. Care is still needed with alignment. Shared data structures might need to be padded out, or repacked using compiler directives such as #pragma pack or _Pack. See Alignment Issues.

A family of derived types that mirrors the system derived types is available in <sys/types32.h>. These types possess the same sign and sizes as the fundamental types of the 32-bit system but are defined in such a way that the sizes are invariant between the ILP32 and LP64 compilation environments.

Sharing pointers between 32-bit and 64-bit processes is substantially more difficult. Obviously, pointer sizes are different, but more importantly, while there is a 64-bit integer quantity (long long) in existing C usage, a 64-bit pointer has no equivalent in a 32-bit environment. In order for a 64-bit process to share data with a 32-bit process, the 32-bit process can only see up to 4 gigabytes of that shared data at a time.

The XDR routine xdr_long(3NSL) might seem to be a problem; however, it is still handled as a 32-bit quantity over the wire to be compatible with existing protocols. If the 64-bit version of the routine is asked to encode a long value that does not fit into a 32-bit quantity, the encode operation fails.