【收藏帖】windows和Linux的数据类型对比
来源:互联网 发布:c语言乘法口诀 编辑:程序博客网 时间:2024/04/26 06:17
目前的疑问:
64位的Linux的long是64bit
64位的windows的long仍旧是32bit,why?
Platform SDK: 64-bit Windows Programming
Abstract Data Models
Every application and every operating system has an abstract data model. Many applications do not explicitly expose this data model, but the model guides the way in which the application's code is written. In the 32-bit programming model (known as the ILP32 model), integer, long, and pointer data types are 32 bits in length. Most developers have used this model without realizing it. For the history of the Win32? API, this has been a valid (although not necessarily safe) assumption to make.
In 64-bit Microsoft? Windows?, this assumption of parity in data type sizes is invalid. Making all data types 64 bits in length would waste space, because most applications do not need the increased size.However, applications do need pointers to 64-bit data, and they need the ability to have 64-bit data types in selected cases. These considerations led to the selection of an abstract data model called LLP64 (or P64). In the LLP64 data model, only pointers expand to 64 bits; all other basic data types (integer and long) remain 32 bits in length.
Initially, most applications that run on 64-bit Windows will have been ported from 32-bit Windows. It is a goal that the same source, carefully written, should run on both 32- and 64-bit Windows. Defining the data model does not make this task easier. However, ensuring that the data model affects only pointer data types is the first step. The second step is to define a set of new data types that allow developers to automatically size their pointer-related data. This allows data associated with pointers to change size as the pointer size changes from 32 bits to 64 bits. Basic data types remain 32 bits in length, so there is no change in the size of data on the disk, data shared over a network, or data shared through memory-mapped files. This relieves developers of much of the effort involved in porting 32-bit code to 64-bit Windows.
These new data types have been added to the Windows API header files. Therefore, you can start using the new types now. For more information, see The New Data Types.
- 【收藏帖】windows和Linux的数据类型对比
- 对比windows和linux的route设置
- linux和windows启动过程的对比
- 从程序员的角度看Linux和windows的对比
- 对比:Linux和Windows系统线程间的区别
- 对比Windows和Linux两系统的动态库
- 对比Windows和Linux两系统的动态库
- 对比Windows和Linux两系统的动态库
- Linux和Windows符号导入导出的对比分析
- Windows和linux操作socket的区别(简单对比)
- Linux与windows的对比
- Lengths of Primitive Java and C++ Data Types on Linux and Windows 32-bit/64-bit (Linux和Windows上Java和C++基本数据类型的长度对比32位/64位)
- 对比:Linux和Windows系统线程间
- Windows 和 Linux开发工具对比
- windows 和linux 同步api对比
- windows和Linux启动过程对比
- Linux和Windows堆栈溢出利用对比
- windows 和linux 同步api对比
- hibernate.hbm2ddl.auto参数说明
- 怎么把项目发布到微信公众平台上面
- test
- Valid Sudoku 数独的有效性
- Sublime2配置less2css插件教程
- 【收藏帖】windows和Linux的数据类型对比
- ArtTemplate使用笔记
- linux下搭建生成HLS所需的.ts和.m3u8文件
- weka数据导入
- LeetCode Binary Search Tree Iterator
- spring4+springmvc+springdataJPA+hibernate4 整合懒加载问题
- 高性能Mysql主从架构的复制原理及配置详解
- Agile 933 - File upload completes successfully but shows as Not Completed and file is not visible on
- 判断iphone设备型号