简体   繁体   English

如何在虚拟内存中找到对象?

[英]How to find the objects in virtual memory?

Is there a way that I can use Java or C# to print the objects in the virtual memory of a specific process? 有没有一种方法可以使用Java或C#在特定进程的虚拟内存中打印对象? I would like to see which objects of my C# application are consuming too much memory. 我想看看我的C#应用​​程序的哪些对象正在消耗过多的内存。 So I would like to print the current running objects in the process. 因此,我想在该过程中打印当前正在运行的对象。 If its not possible are there any software that I could use for this purpose? 如果不可能,是否有任何我可以用于此目的的软件? Please advice 请指教

you can take snapshot of virtual memory at regular intervals through a script or tool and analyze it virtual memory analyzers like heapdump analyzer for java heapdumps you can write a script taking snapshots or use following tools. 您可以通过脚本或工具定期对虚拟内存进行快照,并对其进行虚拟内存分析器(例如Java的heapdump分析器)​​进行分析,您可以编写脚本获取快照或使用以下工具。

  1. .Net Memory Validator .Net内存验证器
  2. Windows Performance monitor Windows性能监视器
  3. Dot trace 点迹
  4. .Net Profiler .Net探查器

and there are many more with some pros and cons. 还有很多优点和缺点。 you can get and analyze vmem snapshots and find out objects in memory at given point of time. 您可以获取和分析vmem快照,并在给定的时间点找到内存中的对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM