How can I figure out what anonymous memory is being used for?

 ̄綄美尐妖づ 提交于 2019-12-11 18:08:39

问题


I have a program which is not running out of heap but for which the use of anonymous/native memory grows and grows. How can I go about figuring out what is using this memory?


回答1:


Inspect a heap dump for DirectByteBuffer objects and what's holding onto them. File mappings would also be a cause, but you say anonymous mappings so that's probably not the issue here since those would be named.

For some things native memory tracking may be useful too.

If it's neither DirectByteBuffer instances nor other memory pools managed by the VM it might be some native library used by your application.



来源:https://stackoverflow.com/questions/33573214/how-can-i-figure-out-what-anonymous-memory-is-being-used-for

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