Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
查看.Net中非托管内存的内存内容_.net_Memory_Memory Leaks_Dllimport - Fatal编程技术网

查看.Net中非托管内存的内存内容

查看.Net中非托管内存的内存内容,.net,memory,memory-leaks,dllimport,.net,Memory,Memory Leaks,Dllimport,我有一个第三方C/C++DLL,我使用DllImport调用它: internal static class wrapper { [DllImport("vendor.dll", CallingConvention = CallingConvention.Cdecl)] public static extern int execute_action(int a, int b); [DllImport("vendor.dll", CallingConvention = C

我有一个第三方C/C++DLL,我使用
DllImport
调用它:

internal static class wrapper {
    [DllImport("vendor.dll", CallingConvention = CallingConvention.Cdecl)]
    public static extern int execute_action(int a, int b);

    [DllImport("vendor.dll", CallingConvention = CallingConvention.Cdecl)]
    public static extern int free_memory();
}
我怀疑我调用的“空闲内存”方法实际上并没有释放它所寻址的所有内存,但可能只是测量结果有误,内存被返回到进程而不是操作系统


我可以检查进程的非托管部分存储在内存中的内容吗?我尝试了ANTS内存探查器,但我当然只能检查托管内存…

DLL不拥有内存。过程确实如此。如果您想测试,只需在循环中运行分配-取消分配循环,看看它是否可以永远运行。当然,很抱歉出现了快捷方式。。。这是一个有趣的想法,但它不能回答问题。因为问题的关键是这个问题没有答案,因为DLL没有内存。。。