En l'instant précis du 14/03/07 14:31, Christopher Schultz s'exprimait
en ces termes:
> Leon,
>
> Leon Rosenberg wrote:
> > But the limit for max memory you can effectively use in your java
> > program on a 32bit linux, i assume you use (same for windows),
> > lies far below  2Gb.
>
> I've been trying to find the real nature of this memory limit. I have
> never experienced this limit, but the only time I've required a heap
> larger than a gig or so was at an old job, and I don't recall exactly
> what the deal was.
>
> The reading I've done so far on this subject leads me to believe that
> most people don't know what they heck they're talking about. Some claim
> that 32-bit OSs can't use more than 4GB RAM (they can) or that they have
> 2GB/2GB kernel and process memory boundaries (they don't, except that I
> think MS Windows might have this), or that the problem is that 32-bit
> OSs cannot allocate more than 2GB of contiguous memory (which may be
> true, but seems irrelevant, since the Java heap need not be contiguous).
>
> So, can you point me to a resource that actually explains what the
> "problem" is and why it exists?
>
> Thanks,
> -chris
>

32 bits architecture, a memory pointer is 32 bits and thus can only
address memory ranges between 0 to 2^32, that makes 4G
back in kernel 2.4 time, you add same pointer to address kernel space
from within application and application allocated space. However, there
needed to be a way to distinguish easily between kernel space and
application space and by this mean prevent user space to play in kernel
space. This was decided the separation would be at 2G. In those time
this was not a real problem. My home computer had barely 32M memory, so
why would i need to address more than 2G? But progressively this limit
became a problem to user applications. Patch were issued to do a 3G/1G
split but it was not enough.

This has changed. An new architecture was brought in CPU (at pentium II
time?) that allowed OS to do a 4G/4G mapping in 32 bits mode. Since you
don't access kernel space from user mode directly, you can simply use
different pointer for kernel space and user space. Hardware wiring
allows to map to different addresses. At application level, it does not
change anything, you still do a malloc and use resulting pointer. At
kernel level, changes have been made when datas are transfered from
kernel space to user space. However, for this 4G/4G split to work, you
will need a 2.6 kernel i think.

So, 4G is the maximum memory any application can allocate in 32 bits
modes, be it at one time or in several operations.

At least that's how i understood story. I only have 1G ram +1G swap, i
can't test, but it bet using a kernel 2.6 you can use 4G for your jvm...

Also, you can go 64bits if it's not enough :)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to