[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.10,2.11
Andrew Kuchling
akuchlin@mems-exchange.org
Sun, 18 Jun 2000 00:22:24 -0400
On Sun, Jun 18, 2000 at 02:50:51AM +0200, Vladimir Marangozov wrote:
>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.
Ooh, you're right. The Linux msync man page says "MS_ASYNC specifies
that an update be scheduled, but the call returns immediately.
MS_SYNC asks for an update and waits for it to complete.
MS_INVALIDATE asks to invalidate other mappings of the same file (so
that they can be updated with the fresh values just written)." So
MS_INVALIDATE seems far too drastic.
>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.
The problem is: does Windows provide equivalent functionality? (Is
there documentation available online for CreateFileMapping that I
could look at?)
>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.
Good idea. I'll try to look at Trent Mick's patch and apply it ASAP
if it checks out.
--amk