[Numpy-discussion] Issues with the memmap object

Sturla Molden sturla@molden...
Mon Jun 18 15:48:08 CDT 2007


On 6/18/2007 9:24 PM, Mike Ressler wrote:

> With python 2.5.1 and numpy 1.0.3 under Fedora 7 x86_64, I just now
> memmap'ed a 10 GB image cube without any trouble. 


You have a 64 bit system. On Linux, the off_t uses by mmap's offset is 
similar to a size_t. Although the larger off_t on a 64 bit system hides 
the problem for files of that size (10 GB), it is still there on a 32 
bit system.

Try to memory map the last 4096 bytes of that 10 GB file on a 32 bit 
system. Memory mapping a single page should not be a problem on any 
computer. You will see that memmap is broken.

Although the offset problem is trivial to solve (it requires a small 
change to the memmap object), this is not the case with the i/o error 
problem. It is anything but trivial.





Sturla Molden













More information about the Numpy-discussion mailing list