64-bit platform Introduction

Source: Internet
Author: User

Currently, the two most popular 64-bit microprocessor architectures are as follows:IA-64 intel 64

IA-64: jointly developed by Intel and Hewlett Packard, used on itanium and itanium 2 microprocessor.

Intel 64: Also known as em64t/amd64/IA-32e/x86-64/x64/hammer architecture, is a 64-bit extension to the original X86 architecture, with backward compatibility.

These two architectures are absolutely different and do not have mutual compatibility. Next we will introduce the situation of Intel 64 on the Windows platform and call it win64.

-------

The 64-bit architecture has the following advantages:

(1) 64-bit address bus space (which means the program can use more memory)

(2) compatible with 32-bit applications

(3) compatible with 32-bit operating systems

-------

In modern 64-bit operating systems, not all modules are 64-bit. To enable 32-bit programs to run on win64, you must enableWow64Mode (Windows on Windows 64 ).

"NOTE: This mode is the default mode of the current 64-bit operating system" wow64 is a Windows sub-system that enables 32-bit running on win64.

Note: win64 is no longer compatible with 16-bit programs. Its kernel module must be 64-bit and the user module can be 32-bit.

The 64-bit address bus space can theoretically address up to 2 ^ 64 = 16eb, but it is certainly not that much.

Currently, the 64-bit Windows Memory in each version can be managed as follows:

Win64 Program Model

(1) The size of the Memory Page is consistent with that of Win32, which is 4 kb.

(2) The first 64 KB of the address space is unavailable; that is, the lowest memory address of the system is 0x10000.

(3) function parameters are no longer transmitted through stack (directly transmitted through registers), which means there are no call conventions (_ stdcall, _ cdecl, _ fastcall, etc)

This difference makes it impossible to have 32-bit modules and 64-bit modules in a program. Therefore, a 64-bit program cannot load a 32-bit dynamic Connection Library and then execute its code.

++

□For 32-bit programs to use larger memory on win64, You need to enable the Link parameter/largeaddressaware so that the program can use about 4 GB of memory in win64 (usually about GB)

See "extended windows application memory to 3 GB"

□The 64-bit program can access the 32-bit DLL through the proxy process and COM technology. For details, refer to this article accessing 32-bit DLLs from 64-bit code.

However, it is easier to load 32-bit DLL resources to 64-bit programs-specifyLoad_library_as_datafileFlag.

 

Ilp32 and lp64 Data Models
The 32-bit environment involves the "ilp32" data model because the C data type is 32-bit int, long, and pointer.
The 64-bit environment uses different data models. At this time, the long and pointer are already 64-bit, which is called the "lp64" data model.
Currently, all 64-bit UNIX platforms use the lp64 data model, while 64-bit Windows uses the llp64 data model. Except for the 64-bit pointer, the basic types are not changed.

For more information about the 64-bit platform, see: http://www.viva64.com/en/l/

Http://software.intel.com/en-us/articles/lessons-on-development-of-64-bit-cc-applications/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.