vs11 beta x64对齐_int64每8字节变量0x20字节 [英] vs11 beta x64 alignment of _int64 0x20 bytes per 8 byte variable
问题描述
在
int _tmain(int argc, _TCHAR* argv[])
{
_int64 ia = (_int64) 0x45678;
_int64 ib = (_int64) 0x7fffffff00000000;
_int64 ic = (_int64) 0x1;
// addrefi(&ia,&ib,&ic);
// ....
每个_int64需要0x20个字节,如
it takes 0x20 bytes per _int64 as in
& ia 0x00000000001bf8e8 {0xcccccccccccccccc } __ int64 *
& ib 0x00000000001bf908 {0xcccccccccccccccc} __ int64 *
& ic 0x00000000001bf928 {0xcccccccccccccccc} __ int64 *
&ia 0x00000000001bf8e8 {0xcccccccccccccccc} __int64 *
&ib 0x00000000001bf908 {0xcccccccccccccccc} __int64 *
&ic 0x00000000001bf928 {0xcccccccccccccccc} __int64 *
我想知道为什么这么少以及如何打包得更好?
which I wondered why so much for so little and how it might be packed better?
推荐答案
可能是其他数据需要执行一些运行时完整性检查。尝试在发布模式下编译,更改/ RTC编译器选项,或在函数前添加此声明:
Probably additional data are required to perform some run-time integrity checks. Try compiling in release mode, change /RTC compiler options, or add this declaration before the function:
#pragma
runtime_checks ( " scu" ,
< span style ="background:white; color:blue; font-family:Consolas; font-size:9.5pt"> off )
这篇关于vs11 beta x64对齐_int64每8字节变量0x20字节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!