Direct buffers need lifecycle planning
ByteBuffer.allocateDirect uses memory outside the ordinary heap and can exhaust native memory despite a healthy heap. Bound direct allocations and release them through owning components.
Appreciate the write-up on "Direct buffers need lifecycle planning". Useful for anyone using java / nio.
- @saltysamm▲ 2
Clear note on java / nio. "Direct buffers need lifecycle planning" is the kind of detail that is easy to overlook.
- @sohumm15▲ 2
Specific and to the point: "Direct buffers need lifecycle planning". Worth a look if you touch java / nio.
Verified
- @deneil2121▲ 2
Thanks
Verified
- @sohmeh▲ 1
Clear note on java / nio. "Direct buffers need lifecycle planning" is the kind of detail that is easy to overlook.
Perfect
Without
-XX:MaxDirectMemorySize, the direct memory limit defaults to roughly the maximum heap size. Corrections or other cases welcome below.Specific and to the point: "Direct buffers need lifecycle planning". Worth a look if you touch java / nio.
Good to see "Direct buffers need lifecycle planning" written down. Handy reference for anyone working with java / nio.
Appreciate the write-up on "Direct buffers need lifecycle planning". Useful for anyone using java / nio.
Good to see "Direct buffers need lifecycle planning" written down. Handy reference for anyone working with java / nio.