using mmap on large (> 2 Gig) files

"Martin v. Löwis" martin at v.loewis.de
Wed Oct 25 00:05:53 CEST 2006


sturlamolden schrieb:
> A patch would involve an new object, say, "mmap.mmap2"  that thakes the
> additional offeset parameter. I don't want it to break any code
> dependent on the existing "mmap.mmap" object. Also, I think mmap.mmap2
> should allow the file object to be None, and in that case return a
> shared memory segment backed by the OS' paging file. Calling
> CreateFileMapping with the filehandle set to INVALID_HANDLE_VALUE is
> how shared memory for IPC is created on Windows.

Python has default parameters for that. Just add a new parameter,
and make it have a default value of 0. No need to add new functions
(let alone types).

In any case, take as much time as you need. Python 2.6 won't be
released until 2008.

Regards,
Martin



More information about the Python-list mailing list