[issue12562] calling mmap twice fails on Windows

2021-10-23 Thread Tim Golden
Tim Golden added the comment: (switching stage to resolved because it's closed/rejected; sorry for the noise) -- stage: -> resolved ___ Python tracker ___ ___

[issue12562] calling mmap twice fails on Windows

2011-08-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue12562] calling mmap twice fails on Windows

2011-08-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that multiprocessing can abstract this kind of things for you: http://docs.python.org/library/multiprocessing#sharing-state-between-processes http://docs.python.org/library/multiprocessing#module-multiprocessing.sharedctypes -- ___

[issue12562] calling mmap twice fails on Windows

2011-08-01 Thread Piotr Zolnierczuk
Piotr Zolnierczuk added the comment: Just looked into my "partner" C++ code and he's using it very much like in Python 2.5: m_obj->map_handle = CreateFileMapping (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,

[issue12562] calling mmap twice fails on Windows

2011-08-01 Thread Piotr Zolnierczuk
Piotr Zolnierczuk added the comment: OK. I will work around it. I was using 'mapping object of a specified size that is backed by the system paging file instead of by a file in the file system' - map->handle == INVALID_HANDLE_VALUE (-1), i.e. shared memory for inter-process communication (n

[issue12562] calling mmap twice fails on Windows

2011-08-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Vlad, thank you for the diagnosis. Indeed by passing a different tagname (or no tagname at all), the problem doesn't occur. Since mmap.mmap() matches the semantics chosen by Microsoft here, I tend to think this is not a bug; besides, "fixing" it would probably

[issue12562] calling mmap twice fails on Windows

2011-07-31 Thread Vlad Riscutia
Vlad Riscutia added the comment: Reason you are seeing the failure for this is following change from 2.5 in mmapmodule.c (:1109): m_obj->data = (char *) MapViewOfFile(m_obj->map_handle, dwDesiredAccess, 0,

[issue12562] calling mmap twice fails on Windows

2011-07-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, pitrou, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue12562] calling mmap twice fails on Windows

2011-07-14 Thread Piotr Zolnierczuk
Changes by Piotr Zolnierczuk : -- components: +Windows type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue12562] calling mmap twice fails on Windows

2011-07-14 Thread Piotr Zolnierczuk
New submission from Piotr Zolnierczuk : Hi, I am trying to migrate from Python 2.5 to Python 2.7 I found though the mmap behaves differently on Windows XP between the two versions. It boils down to the following code: import mmap map1 = mmap.mmap(fileno=0, tagname='MyData', length=4096) map2 =