MemoryError, can I use more?

Diez B. Roggisch deets at nospam.web.de
Sun Feb 14 18:20:40 EST 2010


Am 14.02.10 12:28, schrieb Laszlo Nagy:
> 2010.02.13. 17:40 keltezéssel, Diez B. Roggisch írta:
>> Am 13.02.10 17:18, schrieb Anssi Saari:
>>> Nobody<nobody at nowhere.com> writes:
>>>
>>>> A single process can't use much more than 2GiB of RAM without a
>>>> 64-bit CPU
>>>> and OS.
>>>
>>> That's not really true. Even Windows XP has the /3GB boot option to
>>> allow 3 GiB per process. On PCs, free operating systems and server
>>> Windows can use PAE to give access to full 4 GB per process.
>>
>> No, PAE can be used to access much more memory than 4GB - albeit
>> through paging. AFAIK up to 2^36 Bytes.
> PAE is for the kernel. Yes, you can use much more memory with 32 bit
> kernel + PAE. But the ~3G per 32bit process limit still applies. It is
> because the PAE extension allows the kernel to distribute the same
> virtual address ranges between different processes, but map them to
> different physical memory addresses. However, the process that was
> compiled and is running in 32 bit mode, cannot access more than ~3GB
> simply because it is not able to address more memory locations with 32
> bit addresses. (minus ~1G is because it needs virtual addresses for I/O
> devices as well, and those addresses cannot be mapped to physical memory).

No. It can access more, through paging, similar like mmap. Specialized 
software like databases do that to keep large data in memory. And this 
has nothing to do with compilation.

Of course this doesn't help for python, at least not for python-objects, 
as these need a flat memory model. But it's not true that only the 
kernels benefit from the PAE.

Diez



More information about the Python-list mailing list