Is there a way to increase allocated memory of off-heap ByteBuffer once it has created?
Asked
Active
Viewed 69 times
1 Answers
2
A direct byte buffer may also be created by mapping a region of a file directly into memory. An implementation of the Java platform may optionally support the creation of direct byte buffers from native code via JNI. If an instance of one of these kinds of buffers refers to an inaccessible region of memory then an attempt to access that region will not change the buffer's content and will cause an unspecified exception to be thrown either at the time of the access or at some later time.
The API has no provisions, but there might be a JVM that allows it via JNI. I would say NO.

Joop Eggen
- 107,315
- 7
- 83
- 138