Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

Help: Is there any software or program to test the peak memory used by a program?

Zhanghong_T_
Novice
777 Views
Hi all,
I am looking for a software to record the peak memory (including virtual memory) used by a program when running it. Often the program runs for a long time and it is boring to watch the memory changes in Task Manager of Windows. Can anyone tell me how to record it automatically?
Thanks,
Zhanghong Tang
0 Kudos
4 Replies
greldak
Beginner
777 Views
Have you tried selecting the Peak Memory Usage checkbox on theView->Select Columns page?
0 Kudos
Paul_Curtis
Valued Contributor I
777 Views
The Win32 API function GlobalMemoryStatus returns the total available physical memory as well as the instantaneous available memory, which gives a rough idea of how much memory your program is using (of course, the memory-in-use value reflects all operating processes, not just your program).
0 Kudos
Zhanghong_T_
Novice
777 Views
Thank both of you very much!
Mitchell, can you tell me whether the actual peak memory used by a program includes the Virtual Memory listed in Task Manager?
Paul-Curtis, do you mean that the API function can't calculate the memory only used by my program?
Thanks,
Zhanghong Tang
0 Kudos
g_f_thomas
Beginner
777 Views
The Win API can calculate the memory used by your program but you'll have to know the process handle. After the creation of your process an external inquirer can retrieve the process handle and hence its specific memory usage. The prcview v 3.7.3.1 app freely available at http://www.prcview.com does this and some.

HTH,
Gerry T.
0 Kudos
Reply