Home  >  Article  >  Operation and Maintenance  >  The maximum capacity of virtual memory space is

The maximum capacity of virtual memory space is

王林
王林Original
2019-11-01 09:18:076079browse

The maximum capacity of virtual memory space is

means that the memory address of a 32-bit system has 32 bits, that is, 4 bytes (it means that the memory address of a 64-bit system has 64 bits, that is, 8 bytes).

pow(2,32) bit

pow(2,32)/8 B

pow(2,32)/8/1024 KB

pow(2,32)/8/1024/1024 M

pow(2,32)/8/1024/1024/1024 = 0.5G

The last line is: pow(2,32 )bit=0.5G, why do others say that the maximum memory of 32-bit system is 4G?

What’s interesting is 0.5*8=4, but I can’t figure out why it’s such a coincidence?

Answer: Because pow(2,32) can represent how many virtual memory space addresses, that is, each address contains 1 byte of 8-bit data. Here pow(2,32) does not represent memory, but Indicates how many addresses (different memory spaces) can be included, that is, it does not need to be divided by 8.

pow(2,32)/1024/1024/1024 =X addresses*8bit=4G

Note: Due to the memory consumption of the system itself, we Only about 3.2G is available.

Similarly to the 64-bit operating system, the maximum virtual memory is: pow(2,64)/1024/1024/1024=X addresses*8bit=128G.

Note: Currently mainstream motherboards can expand the memory to 16G, (memory module types: 4G, 8G, 16G)

Recommended tutorial: windows tutorial

The above is the detailed content of The maximum capacity of virtual memory space is. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn