如何在我的项目中了解内存消耗 [英] How Can I Know Memory Consumption In My Project
本文介绍了如何在我的项目中了解内存消耗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我需要一种方法来了解C#项目中的内存消耗,我正在使用WPF作为用户界面和C#作为我的语言进行8-puzzle解算器,我已经使用BFS解决了整个难题DFS,因为我需要比较它们之间的时间和内存消耗,解决相同的谜题,并在新窗口中显示结果,如果你们中的任何人知道任何类型的图书馆或技术,请,需要你的帮助,谢谢
Hello everyone, I need a way to know the memory consumption in a C# project, I'm doing a 8-puzzle solver using WPF as the user Interface and C# as my language, I already solve the entire puzzle using BFS and DFS, both because I need to compare the time and memory consuptions between them solving the same puzzle and show the results in a new window, if anyone of you know any kind of library or technic to do this, please, need your help, thanks
推荐答案
Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
long totalBytesOfMemoryUsed = currentProcess.WorkingSet64;
/ ravi
这篇关于如何在我的项目中了解内存消耗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文