[issue2733] mmap resize fails on anonymous memory (Windows)

2009-03-05 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: - Sorry for having clear solution for this. + Sorry for having no clear solution for this. ___ Python tracker ___

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-03-05 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: More two cents which I noticed. (After the patch was applied) 1. On windows, resize for anonymous map can clear its contents. >>> import mmap >>> m = mmap.mmap(-1, 10) >>> m[:] = "0123456789" >>> m[:] '0123456789' >>> m.resize(20) >>> m[:] '\x00\x00\x00\x00

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-18 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file13131/mmapmodule.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-18 Thread Tim Golden
Tim Golden added the comment: Hirokazu Yamamoto wrote: > Hirokazu Yamamoto 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 agre

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-18 Thread Hirokazu Yamamoto
Hirokazu Yamamoto 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. And the behavior of mmap.resize is not documented clearly though, current behavior for

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-17 Thread Tim Golden
Tim Golden added the comment: >From me, yes of course, but I assume you want another core dev for a 2nd opinion. ___ Python tracker ___ ___ Pyt

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Tim, I confirmed your test fails on my machine, and is fixed by your patch. I want to commit this. Can I? -- components: +Extension Modules, Windows -Library (Lib) nosy: +ocean-city stage: -> commit review versions: +Python 2.6, Python 2.7, Python 3

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-16 Thread Tim Golden
Tim Golden added the comment: Patch attached to mmapmodule.c and test_mmap.py -- keywords: +patch Added file: http://bugs.python.org/file13107/mmapmodule.patch ___ Python tracker ___

[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-16 Thread Tim Golden
Tim Golden added the comment: OK, I can see why this is happening and in fact there are two levels of problem. The trouble is that, in my ignorance, I can't work out exactly why the existing code is doing what it's doing. (References to mmapmodule.c at r69666) Problem 1: At line 456, the Creat

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-02 Thread Trent Nelson
Changes by Trent Nelson <[EMAIL PROTECTED]>: -- nosy: +Trent.Nelson __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscr

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-02 Thread Kathryn M Kowalski
Kathryn M Kowalski <[EMAIL PROTECTED]> added the comment: sorry Added file: http://bugs.python.org/file10170/testofResize.py.txt __ Tracker <[EMAIL PROTECTED]> __ _

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It seems that you attached the output file instead of a python script... -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> ___

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-01 Thread Kathryn M Kowalski
New submission from Kathryn M Kowalski <[EMAIL PROTECTED]>: We have a shared memory module that has been running fine on Windows with Active State Python 2.4.3 Build 12. On machines with 2.5.1.1 mmap.resize fails on an existing anonymous shared memory. The attached file is a stripped down ve