[Python-bugs-list] [Bug #128251] Windows mmap docs need cleaning

noreply@sourceforge.net noreply@sourceforge.net
Thu, 11 Jan 2001 14:51:31 -0800


Bug #128251, was updated on 2001-Jan-09 21:14
Here is a current snapshot of the bug.

Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 6
Submitted by: tim_one
Assigned to : akuchling
Summary: Windows mmap docs need cleaning

Details: WRT the docs for the Windows flavor of mmap.mmap():

1) Doc needed:  The file *must* be opened for update (r+, w+, rb+ or wb+). 
That's because CreateFileMapping is called with PAGE_READWRITE, and that
won't let you increase permissions over the original open mode.  Violating
this yields baffling "The parameter is wrong" Windows errors from
mmap.mmap().

2) Doc needed:  Passing a size of 0 makes the maximum size of the mapping
the actual current size of the file.  Don't know whether that's also true
on Unices (ask AMK?); on Windows it's intentional; and it's handy to know
so it's worth documenting.

3) Doc bug:  The docs read as if omitting the optional tagname is different
than supplying a tagname of None.  I don't believe that's true; needs mild
rewording.

Fred and AMK and c.l.py got a longer version of this msg.  I think the
example of using mmap with re would be worth including too (but it would be
nice to have an example that isn't Windows-specific!  someone should try
that on Linux too, and fiddle as needed).


Follow-Ups:

Date: 2001-Jan-11 14:51
By: fdrake

Comment:
I've updated the documentation according to Tim's comments in
Doc/lib/libmmap.tex revision 1.4.

Andrew: do you know anything about passing a length of zero on Unix?  I
wasn't able to find anything in the mmap() man page, and don't have ready
access to any other reference material at this time.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128251&group_id=5470