CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-XX:MaxDirectMemorySize

This Oracle HotSpot option sets a limit on the amount of memory that can be reserved for all Direct Byte Buffers.

Syntax

-XX:MaxDirectMemorySize=<size>
Setting Value Default
<size> [1[k|K|m|M|g|G] or greater] Depends on maximum heap size

The value you choose is the limit on memory that can be reserved for all Direct Byte Buffers. If a value is set for this option, the sum of all Direct Byte Buffer sizes cannot exceed the limit. After the limit is reached, a new Direct Byte Buffer can be allocated only when enough old buffers are freed to provide enough space to allocate the new buffer.

By default, the VM limits the amount of heap memory used for Direct Byte Buffers to approximately 85% of the maximum heap size.