Windows下的C程序的内存使用情况 [英] Memory usage of a C program under Windows

查看:179
本文介绍了Windows下的C程序的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/8935352/find-total-memory-used-by-program-in-c-under-windows\">find在Windows下用C使用的程序的总内存

我如何得到一个程序在Windows下的C语言的内存使用情况,并把该值在输出文件

How do I get the memory usage of a program in c language under Windows and put that value in an output file

(背景:我正在通过实施排序算法比较两种语言上的一些统计数据)

(Background: I am working on comparing two languages on some stats by implementing sorting algorithms.)

有没有计划这样做......

Is there any program to do so ......

推荐答案

虽然它不再正在积极地开发,C和ObjC code(对于所有我用它),我还没有发现更好的东西 MSS:内存监控系统

Although it's no longer being actively developed, for C and ObjC code (all I've used it for), I haven't found anything better than MSS: Memory Supervision System.

这是非常简单的,易于安装;一直在我的经验非常准确,我以前有很大的影响在我的应用程序淘汰的内存泄漏。

It's extremely straightforward and easy to setup; has been very accurate in my experience and I've used it to great effect to weed out any memory leaks in my applications.

要给你是多么容易使用一个想法:我编译成一个静态库,将其链接到我的程序的调试目标,并把包括单数头(进口为ObjC)共用共享的标头我的方案的所有其余部分使用,因此它跨越,甚至没有必要去想整个程序跟踪内存。

To give you an idea of how easy it is to use: I compiled it into a static library, link it to my program's debug targets and put the include (import for ObjC) for the singular header into a common shared header that all the rest of my program uses, so it tracks memory across the entire program without even needed to think about it.

这篇关于Windows下的C程序的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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