- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
Andrei Zaostrovski
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.
Thanks,
Andrei Zaostrovski
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Andrei,
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 )
write(*,*)
*'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
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 )
write(*,*)
*'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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page