Shared Memory Modules

Thomas Heller theller at python.net
Tue Dec 2 14:16:03 EST 2003


bokr at oz.net (Bengt Richter) writes:

> On Tue, 02 Dec 2003 10:54:19 +0100, Thomas Heller <theller at python.net> wrote:
>
>>Irmen de Jong <irmen at -NOSPAM-REMOVETHIS-xs4all.nl> writes:
>>
>>> Bengt Richter wrote:
>>>> What's that first zero argument?
>>> [...]
>>>> Does that mean you are trying to use stdin as the open file handle?
>>>
>>> No it doesn't, according to Thomas Heller's post in this thread.
>>> Thomas said 0 means "not associated with a file" on windows...
>>
>>mmapmodule.c internally uses INVALID_HANDLE_VALUE of a file handle of 0
>>is used.
> Wouldn't passing None be more pythonic for a python interface?
>
>>
>>As I said, read the source (and MSDN).  And then submit a documentation
>>patch <wink>.
>>
> How does one do that? (being lazy, I guess I could find out via www.python.org)

Finding out how to do this is the easier part ;-)

Ok, to get you started:

<http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/mmapmodule.c>
<http://msdn.microsoft.com/library/en-us/fileio/base/creating_named_shared_memory.asp>
<http://msdn.microsoft.com/library/en-us/fileio/base/createfilemapping.asp>
<http://msdn.microsoft.com/library/en-us/fileio/base/mapviewoffile.asp>

Thomas




More information about the Python-list mailing list