Re: CPython loading modules into memory

2009-02-11 Thread sjbrown
On Feb 11, 2:00 pm, "Martin v. Löwis" wrote: > > Can someone describe the details of how Python loads modules into > > memory?  I assume once the .py file is compiled to .pyc that it is > > mmap'ed in.  But that assumption is very naive.  Maybe it uses an > > anonymous mapping?  Maybe it does othe

Re: CPython loading modules into memory

2009-02-11 Thread Martin v. Löwis
> Can someone describe the details of how Python loads modules into > memory? I assume once the .py file is compiled to .pyc that it is > mmap'ed in. But that assumption is very naive. Maybe it uses an > anonymous mapping? Maybe it does other special magic? This is all > very alien to me, so i

Re: CPython loading modules into memory

2009-02-11 Thread Robert Kern
On 2009-02-11 15:30, sjbrown wrote: Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This i

CPython loading modules into memory

2009-02-11 Thread sjbrown
Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This is all very alien to me, so if someone