惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Project Zero
Project Zero
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
Jina AI
Jina AI
C
Check Point Blog
博客园_首页
The GitHub Blog
The GitHub Blog
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
A
Arctic Wolf
博客园 - 三生石上(FineUI控件)
P
Privacy International News Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Forbes - Security
Forbes - Security
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
T
Troy Hunt's Blog
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
Schneier on Security
Schneier on Security
K
Kaspersky official blog
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
V2EX - 技术
V2EX - 技术
Google DeepMind News
Google DeepMind News
AWS News Blog
AWS News Blog
Know Your Adversary
Know Your Adversary
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Register - Security
The Register - Security
P
Proofpoint News Feed
小众软件
小众软件
S
Securelist
T
Tor Project blog

博客园 - 旴江老段

委托和事件的区别 如何开发和维能hold住全场的软件 什么样的软件才能hold住全场 SNOOP 开发WPF的好工具 被遗忘的事物 前台线程和后台线程(Foreground and Background Threads) runtime binding policy Checking space used in a database AsyncCallback方法和主线程怎么同步呢? Remoting Practice Sample Using Custom Assemblies with Reports 学习SSL和certificate的好网页 Wix Upgrade怎么判断是否更新 学WIX的好网站 SELECT @local_variable (Transact-SQL) sql server try catch and transaction的几个要点 使SQL关键字变大写的小工具 Assert.AreEqual .net 异步调用机制
为什么32位的CPU?为什么32位的CPU只能支持4G的内存呢?
旴江老段 · 2010-12-07 · via 博客园 - 旴江老段

今天产生了一个问题,什么是32位的CPU,什么是32位的OS, 什么是32位的程序?为什么32位的CPU只能支持4G的内存呢?

问题是这样产生的。今天跑SSIS发现内存不够用了,检查内存发现4G的内存只显示3G多,想加内存,但是听说过32位的电脑最多只能支持4G的内存。为什么呢?不知道。都怪年轻时候没好好学习。少壮不努力,老大徒伤悲。赶紧查查吧。

GOOGLE结果如下。内存管理的时候,每块内存都需要一个地址。一块内存的大小是8位,也就是一个byte。这个地址用INT表示,32位的CPU当然只能支持4G的内存了。

顺便解决一个小问题,为什么OS里面显示的内存不是4G呢?32位支持啊?另外的那些内存呢?因为显卡,PCI等其他东西也需要地址空间。

按道理应该结束了,可实际不然。为什么只能用INT来表示内存地址呢?为什么不用long呢?用LONG就可以支持264B的内存了啊。

继续GOOGLE. 发现Word size(不知道怎么翻译)就是CPU一次能处理的位数(bit numbers),32位的CPU一次性能处理32bit 通常Word  size is as same as memory address size. But it does not always hold.  For instance, almost all 8-bit processors, such as 6502, supported 16-bit addresses— if not they would have been limited to a mere 256 byte memory. 之所以32位的CPU只支持32位的内存地址,是因为这样一个内存地址就可以存在一个wordCPU一次所能读取的位数)里,大概这样CPU会更快吧。

这样终于知道了什么是32位的CPU了,但是什么是32位的OS?什么是32位的程序呢?