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

Community
  • 1
  • 1
shruti_rathee
  • 61
  • 2
  • 12
  • 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. – Kerrek SB Jan 18 '12 at 00:16
  • http://stackoverflow.com/questions/69332/tracking-cpu-and-memory-usage-per-process – asaelr Jan 18 '12 at 00:17

2 Answers2

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.

Rabbit
  • 566
  • 5
  • 13
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.

Jon Cage
  • 36,366
  • 38
  • 137
  • 215