Shared Memory Modules

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Mon Dec 1 18:44:15 EST 2003


Scott David Daniels wrote:
> Irmen de Jong wrote:
> 
>> However, I've just tried it, and managed to crash Python in mmap.pyd
>> with an application exception... twice. But trying to reproduce it
>> now fails-- Python keeps running.
>> I did this:
>>  >>> import mmap
>>  >>> mem=mmap.mmap(0,3000000,'irmen')
>>  >>> mem[0]='a'
>>  >>> mem[2000000]='a'
>> and initially, it crashed......... Python 2.3.2 on win xp)
>> --Irmen
> 
> 
> Probably not enough actual memory hanging around.  Some systems
> (and from this I'd guess XP) allocate virtual memory by reserving
> address space, not actually allocating the RAM and/or backing
> store for that memory. 

Over-commit is that called, right?
I'm sorry but that certainly wasn't the case here.
My machine has 512 Mb RAM and about 250 Mb of them
allocated when I tried it. (physical RAM that is)

Very weird, I cannot reproduce the initial crash I experienced.

--Irmen





More information about the Python-list mailing list