This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author titty
Recipients
Date 2006-01-14.12:45:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=17929

1.The mmap module exports MAP_ANON/MAP_ANONYMOUS on unix like 
systems, so someone who has been using mmap in C most probably would 
expect that passing -1 as fileno is possible in order to do anonymous 
mmap's.
(Those who have been using prior versions of python and anonymous mmap 
would also expect the same).

2. The workaround (if -1 is artificially forbidden as fileno) is to open /dev/
zero and using that as a fileno to mmap (this doesn't work on OS X). However, 
since filedescriptors passed to mmap are now dup'ed (starting from version 
2.4.2) this leads to excessive abuse of filedescriptors up to the point that one 
might not be able to use anonymous mmap's because of filedescriptor 
limitations.
 
3. On Windows one can currently pass 0 as fileno in order to allocate 
anonymous memory (which seems wrong, even on windows 0 might be a 
valid filedescriptor? -1 would be a better value here). This is handled as a 
special case in the windows code. So, in Python 2.4.2 it's now harder, maybe 
even impossible, to use anonymous mmap's on unix, whereas in windows it's 
a no brainer. And this module got it's name from a unix system call :).

4. I don't consider this a feature request. 2.4.2 broke existing code.

Guess, I'll have to send a patch.
History
Date User Action Args
2007-08-23 14:37:13adminlinkissue1402308 messages
2007-08-23 14:37:13admincreate