[ python-Bugs-1089974 ] mmap missing offset parameter

SourceForge.net noreply at sourceforge.net
Wed Aug 22 08:36:56 CEST 2007


Bugs item #1089974, was opened at 2004-12-23 03:22
Message generated for change (Comment added) made by huangpeng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1089974&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: James Y Knight (foom)
Assigned to: A.M. Kuchling (akuchling)
Summary: mmap missing offset parameter

Initial Comment:
For some reason, the author of the MMap module didn't see fit to 
expose the "offset" parameter of the mmap syscall to python. It 
would be really nice if it had that. Currently, it's always set to 0.

    m_obj->data = mmap(NULL, map_size,
               prot, flags,
               fd, 0);


----------------------------------------------------------------------

Comment By: Huang Peng (huangpeng)
Date: 2007-08-22 14:36

Message:
Logged In: YES 
user_id=1767524
Originator: NO

I need map a file large than 4G in my program, But it is impossible in an
32bit system. So I need use offset parameter to map specified part of the
file. I want to know when python will expose the offset parameter to us.


----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-02-05 14:05

Message:
Logged In: YES 
user_id=33168

The patch just needs some attention (testing and possible
fixes) on Windows.

----------------------------------------------------------------------

Comment By: George Yoshida (quiver)
Date: 2004-12-29 13:54

Message:
Logged In: YES 
user_id=671362

There's already a patch for this request:

  http://www.python.org/sf/708374
  add offset to mmap

The rationale is same.
It's almost ready to be committed but has been left out for a 
year now. So give it a second chance.


----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-12-29 07:51

Message:
Logged In: YES 
user_id=341410

I would, but I don't know the slightest about the C-level
mmap internals on any platform, and spending the last hour
looking through Python's mmap.c hasn't made me any more
informed.

James (or anyone else who reads this), are you able?

----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2004-12-29 04:34

Message:
Logged In: YES 
user_id=11375

Would either of you care to provide a patch adding the
parameter?  I'll review it...


----------------------------------------------------------------------

Comment By: Josiah Carlson (josiahcarlson)
Date: 2004-12-24 00:57

Message:
Logged In: YES 
user_id=341410

I agree.  Having access to the offset parameter would be
quite convenient, at least to some who use mmap in a
nontrivial fashion.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1089974&group_id=5470


More information about the Python-bugs-list mailing list