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.

Title: allow UNIX mmap size to default to current file size (new)
Type: Stage:
Components: Library (Lib) Versions:
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, loewis
Priority: normal Keywords: patch

Created on 2005-02-19 22:47 by georg.brandl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
py-mmap.diff georg.brandl, 2005-02-19 22:47 patch to allow UNIX mmap to be called with 0 to set mmap size to current file size
Messages (2)
msg47821 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-02-19 22:47
see patch #749830:

This patch makes the UNIX mmap behave like the Windows
mmap in that if you pass 0 as the mmap size, the map
size will default to the current length of the file
being mmapped.

This allows avoids a call to os.stat if you want to map
the entire file. It also makes code using this feature
of the Windows mmap to be portable to UNIX.

This new patch applies cleanly on current CVS HEAD.
msg47822 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 11:24
Logged In: YES 

Thanks for the patches, committed as

libmmap.tex 1.11 1.31
test_mmap 1.10
NEWS 1.1257
mmapmodule.c 2.49
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41605
2005-02-19 22:47:17birkenfeldcreate