使用 DebugDiag 和 LeakTrack 对 Windows 应用商店应用程序中的本机内存泄漏进行故障排除 [英] Troubleshooting native memory leaks in Windows Store applications using DebugDiag and LeakTrack

查看:29
本文介绍了使用 DebugDiag 和 LeakTrack 对 Windows 应用商店应用程序中的本机内存泄漏进行故障排除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景非常简单:

我在 Windows 应用商店应用程序中出现内存泄漏,在使用 dotMemory 分析器后被识别为本机.由于此工具仅限于分析托管内存,因此我通过使用 DebugDiag 执行内存转储分析进行了进一步研究.这让我更进了一步,我发现增加的内存被提交给了 mscoreei 使用的堆(有人有关于这个 dll 的额外信息吗?一个简单的谷歌搜索不会返回太多)

I have a memory leak in a Windows Store App, identified as native after using dotMemory profiler. Since this tool is limited to analyzing managed memory I did further research by performing a memory dump analysis using DebugDiag. This got me one step further and I could find that the increasing memory is committed to a heap used by mscoreei (anyone has additional info about this dll? A simple google search does not return much)

DebugDiag 也有一个很好的功能,称为内存泄漏分析,将 LeakTrack.dll 注入正​​在运行的进程中以收集有关内存分配的信息,这反过来可能有助于识别托管代码的哪些部分使用本机泄漏资源.但是,当我尝试在我的 Windows 应用商店应用程序上使用它时出现错误

DebugDiag also has a nice feature called Memory Leak analysis witch injects the LeakTrack.dll into a running process to collect information about memory allocation, which in turn potentially can help identify which parts of managed code use the native leaking resource. However, I am getting an error when I try use this on my Windows Store App

未能监控进程中的泄漏.... 请确保每个人都拥有...\LeakTrack.dll 的读取和执行权限".

我确实修改了该文件的权限,以便每个人都拥有完全访问权限,但仍然出现相同的错误.

I did modify the permissions to that file so everyone has full access, but still the same error.

我的问题是:

如何在 Windows 应用商店应用中使用 LeakTrack?

How can I use LeakTrack on a Windows Store Apps?

在 Windows 应用商店应用中执行本机内存泄漏的最佳/替代方法是什么?

What is the the best/alternative approach to perform native memory leaks in Windows Store Apps?

推荐答案

我们通过授予当前登录的用户(实际上是他所属的组)调试程序"权限解决了这个问题.

We solved this by giving the currently logged on user (actually the group to which he belonged) the 'Debug Programs' permission.

以下是有关如何执行此操作的说明:

Here are instructions on how to do this:

访问本地组策略:

  1. 从开始"菜单中,选择控制面板".
  2. 在控制面板中,双击管理工具.
  3. 在管理工具"窗口中,双击本地安全策略".
  4. 在本地安全设置"窗口中,展开本地策略"文件夹.
  5. 点击用户权限分配.
  6. 在策略"列中,双击调试程序"以在本地安全策略设置"对话框中查看当前的本地组策略分配.
  7. 要添加新用户,请点击添加用户或组按钮.

这篇关于使用 DebugDiag 和 LeakTrack 对 Windows 应用商店应用程序中的本机内存泄漏进行故障排除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆