Impact of Direct Memory on jvm, jvm memory
Direct Memory
Direct Memory is an important issue. First, it is neither a part of the running data zone nor a part of the Java Virtual Machine specification. This issue is mainly related to NIO after java1.4, an I/O Method Based on channels and buffers. It can use the Native function library to directly allocate off-heap memory, then, you can use the DirectByteBuffer object in the java heap to reference the memory outside the java heap to improve the performance, this prevents the back-and-forth replication of data in the java heap and native heap.
The point is that, since the direct memory is not managed by the java heap, it will also be limited by the total memory. If the administrator sets the dynamically scalable java JVM for the course, if the direct memory is ignored and the total actual memory is greater than the actual memory, the outofmemoryerror will occur when the jvm needs to dynamically expand the memory.