Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 64-bit Porting and Transition Guide: HP 9000 Computers > Chapter 2 Summary of Changes

32-bit and 64-bit Application Interoperability

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Some restrictions apply when sharing objects, such as data and memory, between 32-bit applications and 64-bit applications. These restrictions also apply when sharing objects between 32-bit applications and the 64-bit version of the operating system.

This section summarizes topics described in the HP-UX Application Interoperability White Paper, URL:http://www.software.hp.com/STK/.

General Issue

You should ensure that all data shared between a 64-bit and 32-bit application is of the same size and alignment within both applications.

Shared Memory

32-bit applications can only attach to shared memory segments which exist in a 32-bit virtual address space. 64-bit applications can attach to shared memory segments in a 32-bit or 64-bit virtual address space. To create a shareable memory segment between 32-bit and 64-bit applications, your 64-bit application must specify the IPC_SHARE32 flag with the IPC_CREAT flag when invoking shmget(2). The IPC_SHARE32 flag causes the shared memory segment to be created in a 32-bit address space.

Message Queues

The size of a message queue is defined as type size_t. If your 64-bit application exchanges data with 32-bit applications via message queues, make sure that the size of the message does not exceed the largest 32-bit unsigned value.

Memory-Mapped Files

32-bit applications can only share memory-mapped files that are mapped into a 32-bit virtual address space. 64-bit applications can share memory-mapped files in a 32-bit or 64-bit virtual address space. To map a file into memory that is shareable between 64-bit and 32-bit applications, your 64-bit application must specify the MAP_ADDR32 flag with the MAP_SHARED flag when invoking mmap(2).

nlist

Symbols within 64-bit executables on 64-bit HP-UX are assigned 64-bit values. An application extracting 64-bit values from the symbol table of a 64-bit executable needs 64-bit data fields. 32-bit mode applications must either be ported to 64-bit mode in order to extract 64-bit symbols, or must use the nlist64(3C) function to accomplish this task.

X11/graphics

Although the X-server is supported on both the 32-bit and 64-bit version of HP-UX 11.00, the graphical user interface (GUI) for the client application must be a 32-bit application.

64-bit versions of graphical libraries, such as X11/Motif and all 3D libraries are not provided on HP-UX 11.00 since large memory and process data space are not needed in the GUI component of the application.

Many large applications already support the GUI component for the application in a separate process from the backend processing component and communicate via standard interprocess communication mechanisms.

If you are converting your application to a 64-bit application, and the GUI and backend are in separate processes, follow these guidelines:

  • Leave the GUI component as a 32-bit application.

  • Convert the backend process, which may need to take advantage of more than 4GB of memory or process data space, to a 64-bit process.

If the GUI component and the processing component are in the same process, the GUI component can be split into a separate process and can communicate with the back-end processing component via standard interprocess communication mechanisms.

Large Files

32-bit applications can open, create and use large files. A large file is a file that is 2GBs or greater. However, when creating or opening large files, your 32-bit application must specify the O_LARGEFILE flag with the open(2) system call.

Also, using lseek(2) within a 32-bit application to position a file pointer beyond 2GB produces undefined results. You should use the lseek64(2) interface instead.

For detailed information, see the HP-UX 11.00 white paper titled HP-UX Large Files in /usr/share/doc/lg_files.ps.

pstat

The following pstat_get*(2) system calls may fail, with errno set to EOVERFLOW, when invoked within 32-bit applications. This is because within 64-bit HP-UX, many parameters, limits and addresses are 64-bit values and they cannot fit into fields of the corresponding struct pst_* data structure.

pstat_getdynamic(2)
pstat_getipc(2)
pstat_getproc(2)
pstat_getprocvm(2)
pstat_getshm(2)
pstat_getfile(2)
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.