0

Possible Duplicate:
find total memory used by program in c under windows

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 ......

2
  • 2
    You can try the ordinary Task Manager, or Sysinternal's Process Monitor or Process Explorer. The Windows 7 Task Manager is fairly powerful, I should add. Commented Jan 18, 2012 at 0:16
  • stackoverflow.com/questions/69332/… Commented Jan 18, 2012 at 0:17

2 Answers 2

2

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.

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Is windows task manager not enough?

To launch it from Windows 7 just right-click on the task bar and select 'Task manager'. Locate your program in the 'Processes' tab and check the memory column to keep an eye on it.

2 Comments

i need the memory usage of a program in c lanuage in windows...not the memory of any process.... i need to output that in an out file
This is useful information that should have been in the body of the question...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.