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 tim.golden
Recipients amaury.forgeotdarc, kmk, ocean-city, tim.golden, trent
Date 2009-02-18.15:37:57
SpamBayes Score 1.3165596e-10
Marked as misclassified No
Message-id <499C2B49.9080605@timgolden.me.uk>
In-reply-to <1234970710.49.0.675170622816.issue2733@psf.upfronthosting.co.za>
Content
Hirokazu Yamamoto wrote:
> Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> added the comment:
> 
> I reconsidered this issue. When mmap is anonymous, 
> self->file_handle == INVALID_HANDLE_VALUE (-1), so we should not call
> SetFilePointer and SetEndOfFile for this handle.

I'm inclined to agree. I must admit, I was pushing a change
which changed as little as possible; I think, in hindsight,
it does *too* little.

> For file mapping object, mmap.resize() resizes underlying file too, but
> for anonymous mapping object, doesn't resize memory region itself. I
> cannot find the Win32API to resize memory region created by
> CreateFileMapping. I'm not sure this difference is intended by mmap
> module writer. Maybe is_resizeable(mmap_object *self) should return 0
> for anonymous mapping object on windows. (Of course, such  difference
> might be acceptable because mmap.size() already have such difference)

I have no strong opinion myself. In reality I rarely use mmaps;
I merely saw the call in the recent bug cleanup and thought I
might be of use. 

I'm not sure who's best placed to decide what
should happen, but my feeling is that altering the existing
interface by, eg, removing the ability of an anonymous Windows
mmap to resize is not a good idea. There may be code which
is already using it.
History
Date User Action Args
2009-02-18 15:37:59tim.goldensetrecipients: + tim.golden, amaury.forgeotdarc, ocean-city, kmk, trent
2009-02-18 15:37:57tim.goldenlinkissue2733 messages
2009-02-18 15:37:57tim.goldencreate