Meaning of -XX:MaxDirectMemorySize

Mark Reinhold mr at sun.com
Thu Mar 5 18:35:03 UTC 2009


> Date: Thu, 05 Mar 2009 16:05:52 +0000
> From: alan.bateman at sun.com

>                                                    ... The issue will
> likely come down to the meaning of the value passed to the
> MaxDirectMemorySize option. Would I be correct to say that the original
> intention was to limit the total memory usage and not the total
> capacity? It was original implemented (in jdk5) to limit the total
> capacity but I assume that was an oversight.  The difference becomes an
> issue when the buffer capacity is small but the page size is large.

The original intent was to limit the total capacity, measured in bytes,
of all direct buffers.  Additional memory allocated due to rounding the
size of each direct buffer up to the nearest page size was not to be
counted.

We assumed that large pages wouldn't be an issue -- is that what you're
running into?

- Mark



More information about the core-libs-dev mailing list