Implementing file reading in C/Python
Steve Holden
steve at holdenweb.com
Mon Jan 12 21:26:27 EST 2009
sturlamolden wrote:
> On Jan 12, 1:52 pm, Sion Arrowsmith <si... at chiark.greenend.org.uk>
> wrote:
>
>> And today's moral is: try it before posting. Yeah, I can map a 2GB
>> file no problem, complete with associated 2GB+ allocated VM. The
>> addressing is clearly not working how I was expecting it too.
>
> The virtual memory space of a 32 bit process is 4 GB.
>
I believe, though, that in some environments 2GB of that is mapped onto
the operating system, to allow system calls to access OS memory
structures without any VM remapping being required - see
http://blogs.technet.com/markrussinovich/archive/2008/11/17/3155406.aspx.
Things have, however, improved if we are to believe what we read in
http://www.tenouk.com/WinVirtualAddressSpace.html
The very idea of mapping part of a process's virtual address space onto
an area in which "low-level system code resides, so writing to this
region may corrupt the system, with potentially catastrophic
consequences" seems to be asking for trouble to me. It's surprising
things used to don't go wrong with Windows all the time, really. Oh,
wait a minute, they did, didn't they? Still do for that matter ...
getting-sicker-of-vista-by-the-minute-ly yr's - steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list