Abdelouahab
Abdelouahab

Reputation: 7559

Why 2 GB and not 4 GB on 32 bits limitation?

Sorry for this dumb question, but when reading about 32 bits limitation, i found that due to Memory-Mapped method, MongoDB can't store more than 2 GB, but:

2^32 = 4 GB

So why the limit is only 2 GB? is that because:

2^(32-1) = 2 GB

Upvotes: 2

Views: 202

Answers (1)

Grzegorz Żur
Grzegorz Żur

Reputation: 49241

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.

Upvotes: 4

Related Questions