Memory demand

Memory demand

The program I am working with is a numerical simulator allocating large data arrays (Windows NT, 98). For the program performance it is crucial that the application is not using virtual memory and stays within RAM.
I?d like to know if there is any command in Compaq Visual Fortran that can return total memory used by the running application? It would help me to define memory demands and optimize runs.

Andrei Zaostrovski

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I think you need to include the following lines in your code to inquire about currently available physical memory:
use kernel32
use dfwinty

type(T_MEMORYSTATUS) lpMstMemStat

call GlobalMemoryStatus ( lpMstMemStat )
*'Bytes of physical memory available -> ',
* lpMstMemStat.dwAvailPhys

There are many other elements in the structure that can be queried as well.

But I have been puzzled at the operation of this command; it seems to result in a system memory leak. That is, when I run a simple program with the above successively routines I get less and less available memory. Maybe it's a quirk with my computer.
Also, does anybody know how to look up the CPU clock frequency?

Harry Bell

Leave a Comment

Please sign in to add a comment. Not a member? Join today