[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.10,2.11
Vladimir Marangozov
Vladimir.Marangozov@inrialpes.fr
Sun, 18 Jun 2000 02:50:51 +0200 (CEST)
A.M. Kuchling wrote:
>
> Update of /cvsroot/python/python/dist/src/Modules
> In directory slayer.i.sourceforge.net:/tmp/cvs-serv2060
>
> Modified Files:
> mmapmodule.c
> Log Message:
> Fix the size() method to return the size of the file on Unix, not the
> size of the mapped area. This seems to be what the Windows version does.
> This change requires keeping around the fd of the mapped file.
On AIX, the test_mmap fails with errno=EINVAL on the m.flush() method.
It works okay without the MS_INVALIDATE flag though, so I'd suggest
removing it from msync in the flush and dealloc methods.
Also, it would probably be a good idea to allow optional flags for
flush, as it's done in new_mmap_object, the default being only MS_SYNC.
Given that this module is enabled by default, I think that it needs some
more stress-testing in test_mmap.py. I'll try to add a couple of tests
shortly.
--
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252