Re: Memory limitations in Linux.

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Wed May 03 2000 - 14:17:46 EST


Mark Zealey wrote:
> > When AMD releases their IA32 processors with 64 bit extensions, perhaps
> > that will support more than 4GB per process too.
> >
> > You can of course _access_ much more than that per process. And the
> > total RAM shared between all processes is not subject to the 4GB
> > limitation. On Pentium Pros you can use 64GB total RAM.
>
> Can't you get 4TB on i386's? using page gran. That's what it says in 'the
> indespensable PC hardware book'.

The 64GB restriction on total RAM is documented by Intel: "The physical
address extension (PAE) flag in register CR4 enables an extension of
physical addresses from 32 bits to 36 bits. (This feature was
introduced into the Intel Architecture in the Pentium Pro processors.)
Here, the processor provides 4 address line pins to accomodate
additional address bits. This option can only be used when paging is
enabled (that is, when both the PG flag in register CR0 and the PAE flag
in register CR4 are set)."

Those 4 extra lines mean you get up to 64GB physical RAM.

Per process you are still limited to 4GB, and Linux reduces this to
about 3GB (you can move it closer to 4GB if you want -- but that may
harm performance).

Per-process address space is restricted to the size of a pointer, which
is 32 bits on IA32.

You can get around this by changing the pointer size and the way memory
is accessed. You have to swap pages around in user space. Rather like
EMS with 16 bit DOS programs. But (a) it's slow; (b) it requires a
special compiler; (c) it sucks.

But if you can get the compiler than you will find that Linux _does_ in
fact support this. mmap() on a large RAM disk provides the necessary
functionality. A new miracle every day :-)

enjoy,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:12 EST