使用参数-XX:+ HeapDumpOnOutOfMemoryError启动JVM.但它并没有在outofmemory上创造堆积.
当本地分配失败时,Java不会创建heapdump吗?
以下是日志:
# There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 1184288 bytes for Chunk::new # An error report file with more information is saved as: # D:\product\bin\hs_err_pid5876.log java.lang.OutOfMemoryError
- 编辑 -
最大堆大小设置为4GB,系统RAM大小为16GB,当内存不足时,它使用> 11GB(由Windows任务管理器显示).
从与@ alain.janinm的讨论....我想我可以得出结论,JVm甚至没有足够的内存来生成heapdump.
那么,创建heapdump是否有可能导致JVM使用那么多系统内存