Why 32-bit processor can only address 4GiB of memory, even with large word size?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Until now I thought that a 32-bit processor can use 4 GiB of memory because 232 is 4 GiB, but this approach means processor have word size = 1 byte. So a process with 32-bit program counter can address 232 different memory words and hence we have 4 GiB.
But if a processor has word size larger than 1 byte, which is the case with most of processors now days I believe (My understanding is that word size is equal to the width of data bus, so a processor with 64-bit data bus must have a word size = 8 bytes).
Now same processor with 32 bit Program counter can address 2^32 different memory words, but in this case word size is 8 bytes hence it can address more memory which contradicts with 4 GiB thing, so what is wrong in my argument ?
memory-address processor addressing program-counter
|
show 2 more comments
Until now I thought that a 32-bit processor can use 4 GiB of memory because 232 is 4 GiB, but this approach means processor have word size = 1 byte. So a process with 32-bit program counter can address 232 different memory words and hence we have 4 GiB.
But if a processor has word size larger than 1 byte, which is the case with most of processors now days I believe (My understanding is that word size is equal to the width of data bus, so a processor with 64-bit data bus must have a word size = 8 bytes).
Now same processor with 32 bit Program counter can address 2^32 different memory words, but in this case word size is 8 bytes hence it can address more memory which contradicts with 4 GiB thing, so what is wrong in my argument ?
memory-address processor addressing program-counter
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
1
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
1
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
2
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11
|
show 2 more comments
Until now I thought that a 32-bit processor can use 4 GiB of memory because 232 is 4 GiB, but this approach means processor have word size = 1 byte. So a process with 32-bit program counter can address 232 different memory words and hence we have 4 GiB.
But if a processor has word size larger than 1 byte, which is the case with most of processors now days I believe (My understanding is that word size is equal to the width of data bus, so a processor with 64-bit data bus must have a word size = 8 bytes).
Now same processor with 32 bit Program counter can address 2^32 different memory words, but in this case word size is 8 bytes hence it can address more memory which contradicts with 4 GiB thing, so what is wrong in my argument ?
memory-address processor addressing program-counter
Until now I thought that a 32-bit processor can use 4 GiB of memory because 232 is 4 GiB, but this approach means processor have word size = 1 byte. So a process with 32-bit program counter can address 232 different memory words and hence we have 4 GiB.
But if a processor has word size larger than 1 byte, which is the case with most of processors now days I believe (My understanding is that word size is equal to the width of data bus, so a processor with 64-bit data bus must have a word size = 8 bytes).
Now same processor with 32 bit Program counter can address 2^32 different memory words, but in this case word size is 8 bytes hence it can address more memory which contradicts with 4 GiB thing, so what is wrong in my argument ?
memory-address processor addressing program-counter
memory-address processor addressing program-counter
edited Nov 17 '18 at 6:17
phuclv
16.4k957236
16.4k957236
asked Nov 7 '15 at 11:50
mightyWOZmightyWOZ
495915
495915
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
1
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
1
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
2
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11
|
show 2 more comments
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
1
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
1
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
2
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
1
1
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
1
1
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
2
2
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11
|
show 2 more comments
2 Answers
2
active
oldest
votes
CPU (at least x86 family 32-bit) must be able to access any byte/word/dword in 4GB space. So an instruction is encoded such a way that target word size and memory address (usually) belong to different bit-fields. So it doesn't matter whether CPU accesses byte or dword, but the encoded memory address must be the same.
Note that 32-bit OS and x86 CPU technically is able to acccess more than 4GB address space using PAE mode. But it is not supported by, say, the current Windows OS family (except Server editions). Some versions of WinXP, as well as Linux and other 32-bit OS can address 64GB of memory on x86 CPU.
Also, usually OS reserves some part of virtual address space (for OS kernel, Video memory etc.), so user programs may use, say, no more than 3 GB of RAM of the 4GB an OS can address within each process.
add a comment |
Your premise is incorrect. 32-bit architectures can address more than 4GB of memory, just like most 8-bit microcontrollers can use more than 256 bytes of memory.
For example 64-bit JVM can address 32GB of memory with 32-bit pointer using compressed Oops. See the Trick behind JVM's compressed Oops
32-bit x86 CPUs can also address 64GB of memory with PAE. The analog on ARM is LPAE.
The main thing here is that a 32-bit process only has 4GB of address, so it can't address more even though the OS itself supports more than 4GB of RAM. Generally the address space is split between user and kernel space, hence limited the user memory even more. There are several ways to workaround this
- Spawning multiple processes, which is used in Adobe Premiere CS4
- Mapping the needed part of memory into the current address space, like Address Windowing Extensions on Windows
- ...
You're still correct that a 32-bit program counter can address 232 different memory words. But no modern architectures use word-addressable memory although they did exist in the past
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33582419%2fwhy-32-bit-processor-can-only-address-4gib-of-memory-even-with-large-word-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
CPU (at least x86 family 32-bit) must be able to access any byte/word/dword in 4GB space. So an instruction is encoded such a way that target word size and memory address (usually) belong to different bit-fields. So it doesn't matter whether CPU accesses byte or dword, but the encoded memory address must be the same.
Note that 32-bit OS and x86 CPU technically is able to acccess more than 4GB address space using PAE mode. But it is not supported by, say, the current Windows OS family (except Server editions). Some versions of WinXP, as well as Linux and other 32-bit OS can address 64GB of memory on x86 CPU.
Also, usually OS reserves some part of virtual address space (for OS kernel, Video memory etc.), so user programs may use, say, no more than 3 GB of RAM of the 4GB an OS can address within each process.
add a comment |
CPU (at least x86 family 32-bit) must be able to access any byte/word/dword in 4GB space. So an instruction is encoded such a way that target word size and memory address (usually) belong to different bit-fields. So it doesn't matter whether CPU accesses byte or dword, but the encoded memory address must be the same.
Note that 32-bit OS and x86 CPU technically is able to acccess more than 4GB address space using PAE mode. But it is not supported by, say, the current Windows OS family (except Server editions). Some versions of WinXP, as well as Linux and other 32-bit OS can address 64GB of memory on x86 CPU.
Also, usually OS reserves some part of virtual address space (for OS kernel, Video memory etc.), so user programs may use, say, no more than 3 GB of RAM of the 4GB an OS can address within each process.
add a comment |
CPU (at least x86 family 32-bit) must be able to access any byte/word/dword in 4GB space. So an instruction is encoded such a way that target word size and memory address (usually) belong to different bit-fields. So it doesn't matter whether CPU accesses byte or dword, but the encoded memory address must be the same.
Note that 32-bit OS and x86 CPU technically is able to acccess more than 4GB address space using PAE mode. But it is not supported by, say, the current Windows OS family (except Server editions). Some versions of WinXP, as well as Linux and other 32-bit OS can address 64GB of memory on x86 CPU.
Also, usually OS reserves some part of virtual address space (for OS kernel, Video memory etc.), so user programs may use, say, no more than 3 GB of RAM of the 4GB an OS can address within each process.
CPU (at least x86 family 32-bit) must be able to access any byte/word/dword in 4GB space. So an instruction is encoded such a way that target word size and memory address (usually) belong to different bit-fields. So it doesn't matter whether CPU accesses byte or dword, but the encoded memory address must be the same.
Note that 32-bit OS and x86 CPU technically is able to acccess more than 4GB address space using PAE mode. But it is not supported by, say, the current Windows OS family (except Server editions). Some versions of WinXP, as well as Linux and other 32-bit OS can address 64GB of memory on x86 CPU.
Also, usually OS reserves some part of virtual address space (for OS kernel, Video memory etc.), so user programs may use, say, no more than 3 GB of RAM of the 4GB an OS can address within each process.
edited Dec 15 '17 at 13:45
Community♦
11
11
answered Nov 7 '15 at 12:14
MattMatt
3,3661611
3,3661611
add a comment |
add a comment |
Your premise is incorrect. 32-bit architectures can address more than 4GB of memory, just like most 8-bit microcontrollers can use more than 256 bytes of memory.
For example 64-bit JVM can address 32GB of memory with 32-bit pointer using compressed Oops. See the Trick behind JVM's compressed Oops
32-bit x86 CPUs can also address 64GB of memory with PAE. The analog on ARM is LPAE.
The main thing here is that a 32-bit process only has 4GB of address, so it can't address more even though the OS itself supports more than 4GB of RAM. Generally the address space is split between user and kernel space, hence limited the user memory even more. There are several ways to workaround this
- Spawning multiple processes, which is used in Adobe Premiere CS4
- Mapping the needed part of memory into the current address space, like Address Windowing Extensions on Windows
- ...
You're still correct that a 32-bit program counter can address 232 different memory words. But no modern architectures use word-addressable memory although they did exist in the past
add a comment |
Your premise is incorrect. 32-bit architectures can address more than 4GB of memory, just like most 8-bit microcontrollers can use more than 256 bytes of memory.
For example 64-bit JVM can address 32GB of memory with 32-bit pointer using compressed Oops. See the Trick behind JVM's compressed Oops
32-bit x86 CPUs can also address 64GB of memory with PAE. The analog on ARM is LPAE.
The main thing here is that a 32-bit process only has 4GB of address, so it can't address more even though the OS itself supports more than 4GB of RAM. Generally the address space is split between user and kernel space, hence limited the user memory even more. There are several ways to workaround this
- Spawning multiple processes, which is used in Adobe Premiere CS4
- Mapping the needed part of memory into the current address space, like Address Windowing Extensions on Windows
- ...
You're still correct that a 32-bit program counter can address 232 different memory words. But no modern architectures use word-addressable memory although they did exist in the past
add a comment |
Your premise is incorrect. 32-bit architectures can address more than 4GB of memory, just like most 8-bit microcontrollers can use more than 256 bytes of memory.
For example 64-bit JVM can address 32GB of memory with 32-bit pointer using compressed Oops. See the Trick behind JVM's compressed Oops
32-bit x86 CPUs can also address 64GB of memory with PAE. The analog on ARM is LPAE.
The main thing here is that a 32-bit process only has 4GB of address, so it can't address more even though the OS itself supports more than 4GB of RAM. Generally the address space is split between user and kernel space, hence limited the user memory even more. There are several ways to workaround this
- Spawning multiple processes, which is used in Adobe Premiere CS4
- Mapping the needed part of memory into the current address space, like Address Windowing Extensions on Windows
- ...
You're still correct that a 32-bit program counter can address 232 different memory words. But no modern architectures use word-addressable memory although they did exist in the past
Your premise is incorrect. 32-bit architectures can address more than 4GB of memory, just like most 8-bit microcontrollers can use more than 256 bytes of memory.
For example 64-bit JVM can address 32GB of memory with 32-bit pointer using compressed Oops. See the Trick behind JVM's compressed Oops
32-bit x86 CPUs can also address 64GB of memory with PAE. The analog on ARM is LPAE.
The main thing here is that a 32-bit process only has 4GB of address, so it can't address more even though the OS itself supports more than 4GB of RAM. Generally the address space is split between user and kernel space, hence limited the user memory even more. There are several ways to workaround this
- Spawning multiple processes, which is used in Adobe Premiere CS4
- Mapping the needed part of memory into the current address space, like Address Windowing Extensions on Windows
- ...
You're still correct that a 32-bit program counter can address 232 different memory words. But no modern architectures use word-addressable memory although they did exist in the past
edited Jul 5 '18 at 5:46
answered May 22 '17 at 14:27
phuclvphuclv
16.4k957236
16.4k957236
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f33582419%2fwhy-32-bit-processor-can-only-address-4gib-of-memory-even-with-large-word-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
32-bit processors are not limited to using 4 GiB of memory, your whole premise is incorrect.
– davmac
Nov 7 '15 at 12:22
so does that mean 32 bit processors can use any amount of memory
– mightyWOZ
Nov 7 '15 at 13:00
1
no, it means a 32-bit processor can use however much memory that particular 32-bit processor can use. There's more than one 32-bit processor, you see.
– davmac
Nov 7 '15 at 13:28
1
@Balraj 4GB per single process, but it could be more for the whole PC (that's how x86 PAE works). Another option is bigger counter, say, 40-bit as in LPAE in ARM-32. And so on.
– Matt
Nov 7 '15 at 14:13
2
@Balraj a 32-bit program counter can address 2^32 locations (of unspecified size).
– davmac
Nov 7 '15 at 16:11