Summary
Do not include the memory used by internal temporary direct buffers in the total of allocations which is limited by the maximum direct buffer memory size setting.
Problem
Currently all direct buffer memory is tracked and and the total memory allocated is limited by the maximum direct buffer memory size setting. (This value is configurable by the VM option -XX:MaxDirectMemorySize=size
.) Including the amount of memory used by internal temporary buffers makes it harder for applications to limit the amount of memory application code explicitly uses and problematic to test the correct functioning of the maximum direct buffer memory size constraint.
Solution
Do not include the memory used by internal temporary direct buffers in the amount of memory that is limited.
Specification
There is no specification change; this is a behavioral change only.
- csr of
-
JDK-8344882 (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory
-
- Resolved
-
- links to