Where do these java native memory allocated from?

自古美人都是妖i 提交于 2019-11-28 11:37:49

Use jemalloc or tcmalloc - they both have built-in allocation profiler that will help to identify the source of allocations.

Java process may use too much native memory for many reasons. Popular reasons are

  • Direct ByteBuffers
  • Memory allocated by Unsafe.allocateMemory
  • Unclosed resources (e.g. ZipInputStream)
  • other native libraries

Note that NativeMemoryTracking will not show memory consumed by native libraries.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!