抱歉这个愚蠢的问题,但是在阅读大约 32 位限制时,我发现由于 Memory-Mapped 方法,MongoDB 不能存储超过 2 GB,但是:
2^32 = 4 GB
那么为什么限制只有 2 GB?那是因为:
2^(32-1) = 2 GB
抱歉这个愚蠢的问题,但是在阅读大约 32 位限制时,我发现由于 Memory-Mapped 方法,MongoDB 不能存储超过 2 GB,但是:
2^32 = 4 GB
那么为什么限制只有 2 GB?那是因为:
2^(32-1) = 2 GB
It is due to virtual address space organization. Part of 4 GB address space is reserved for operating system (kernel space), so only part (user space, usually 2GB or 3GB) is available to the process itself. Memory mapped files must fit into this limitation.