Why doesn't Python's mmap work with large files?

后端 未结 8 1188
遇见更好的自我
遇见更好的自我 2020-12-01 05:11

[Edit: This problem applies only to 32-bit systems. If your computer, your OS and your python implementation are 64-bit, then mmap-ing huge files works reliably and

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 05:32

    You're setting the length parameter to zero, which means map in the entire file. On a 32 bit build, this won't be possible if the file length is more than 2GB (possibly 4GB).

提交回复
热议问题