| March 10, 2009 1:00 AM PDT | |
Challenge
Choose the appropriate model for porting an application from the Win32 environment to Win64. Win64 provides four different porting options. The correct option for a given application depends on the specific needs of that application.
Solution
Choose the porting model based on an evaluation of the application's needs in terms of address space, data-size expansion, and performance under the Win32 environment. Those requirements will allow you to categorize the application according to one of the following four models:
-
64-Bit Full Port: A 64-bit full port is the optimal scenario to take full advantage of the 64-bit Intel® architecture. A 64-bit full port should be considered if there is a current or future need for more than 2 GB of address space and where data and code expansion are not an issue. A 64-bit full port requires you to do a full code clean, which includes eliminating all of the warnings that are gernerated at compile time. External modules, such as DLLs that are acquired from (or provided to) third parties, should consider a full 64-bit port. A 64-bit full port should also be considered for applications where there is not a straightforward basis for partitioning between the 32-bit and 64-bit sections.
-
Small Address Space with 64-bit Pointers: This model should be considered if there is no need for a larger address space (2 GB is sufficient), and data-size expansion is not an issue. For this model, you can ignore most of the pointer truncation warnings. All addresses may safely be truncated into a 32-bit quantity (the upper 32 bits are 0).
-
Small Address Space with 32-bit Pointers: This model should be considered if there is no need for a larger address space (2 GB is sufficient), and there are some concerns about data-size expansion. In this model, you can ignore most of the pointer-truncation warnings. 64-bit pointers are still required for interaction with the operating system.
-
Win32 Application: In this option, you do not need to do anything. This option should be chosen if the performance on 32-bit Intel architecture is adequate and there is no need for address space greater than 2 GB. In Win64, 32-bit modules and 64-bit modules cannot co-exist in the same process, so applications planning on using a combination of 64-bit modules and 32-bit modules need to use RPC or a COM/DCOM-based Inter Process Communication mechanism to connect the IA-64 and IA-32 processes together. This option should be chosen if any of the following are true:
-
There is easy partitioning between the 32-bit and 64-bit modules.
-
Inter Process communication wrappers are easier to implement than a full 64-bit port.
-
There is a concern about the memory-size expansion with pointer-intensive data sets.
-
Source
Porting Microsoft Windows Applications to Intel® Itanium® Processor Systems
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (0) 
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.
Tags for this Page
