64位进程可以消耗的最大内存是多少?

jco*_*and 1 64bit

我知道有 2^48 位的硬件容量,我知道内核对应用程序内存限制一般没有很多本机限制,但是应用程序可以使用的内存是否有上限除了 2^48 之外,一般会消耗,因为这是 DIMM 插槽上可用的通道数?

作为参考,Redmond 在大多数服务器产品上将他们的产品限制在 ~2TB。

Gil*_*il' 5

By definition (at least, by a common definition), a 64-bit process can only see 264 bytes of memory. In practice, most operating systems limit each process to a little less than the available address space, so that the kernel can manipulate 64-value that can be pointers to kernel memory, process memory or device memory. A 4EB or 8EB limit is common.

Well before that, you'll probably hit an architecture-dependent limit. In particular, a process's memory map has to fit in the machine's MMU, and hardware tends to have only as many bits as necessary. MMUs come with up to four levels of page tables, and Linux (amongst others) can support all four: a PGD (page global directory) listing PUDs (page upper directories) listing PMDs (page mid-level directories) listing PTEs (page table entries). Since each level of indirection is one more step to take on most pointer dereferences, systems . It is common for the size of a page to be 4kB (21242 addressable bytes, however most 64-bit architectures can be configured for larger page tables, so it is hard to give any kind of general answer to the question of how high you can go.

请注意,每个进程的地址限制与机器中可以有多少物理内存无关。例如,PC 中 DIMM 插槽上可用的通道数量是该 PC 中可以拥有多少 RAM 的理论限制(尽管 CPU 内存总线的宽度通常是限制因素)。它与进程可以消耗多少内存或多少地址空间无关(内存可以换出,或在NUMA多处理器机器的多个节点之间共享)。