最近在學c++,跟着書打了這個代碼:c++
int dnout = 4; int dnout2 = 4; cout<< "dnout = "<<dnout<<" add = "<< &dnout <<endl; cout<< "dnout = "<<dnout2<<" add = "<< &dnout2 <<endl;
x86_64的環境編譯指令:google
clang++ -Wall -g -std=c++11 -stdlib=libc++ test.cpp -o test ./test
運行結果:spa
dnout = 4 add = 0x7fff 6960 277c
dnout = 4 add = 0x7fff 6960 2778操作系統
發現地址並非想像中的0x[0-f]{16} 個人64位電腦地址線只有48根!code
而後以32位編譯blog
clang++ -Wall -g -m32 -std=c++11 -stdlib=libc++ test.cpp -o test ./test
dnout = 4 add = 0xc001 5974
dnout = 4 add = 0xc001 5970產品
正常的32根地址線。console
百度 google後 發現目前不兼容32位的安騰也只有50根地址線。編譯
http://ark.intel.com/products/43407/Intel-Itanium-Processor-9310-10M-Cache-1_60-GHz-4_80-GTs-Intel-QPI class
通常的x86_64 intel的產品 ,有36,40,46 等等根地址線的產品
至於,爲何console顯示48根地址線,應該歸功於操做系統的虛擬地址。根據操做系統的不一樣而不一樣把。