- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my application, I load a lot of information into a large array, when the array is full I write further information to file.
With different PC's I sould be able to make the array bigger and so my application should run faster.
I therefore need to determine the amount of system memory so I can decide how big I can make my array.
Is there a call that will give me this?
Thanks,
David
With different PC's I sould be able to make the array bigger and so my application should run faster.
I therefore need to determine the amount of system memory so I can decide how big I can make my array.
Is there a call that will give me this?
Thanks,
David
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's how I find available physical memory with CVF 6.6:
use dfwin
use dflogm
use dfcom
(not sure which one of these is required)
...
type(T_MEMORYSTATUS) lpMstMemStat
...
call GlobalMemoryStatus ( lpMstMemStat )
ipmem_start = lpMstMemStat.dwAvailPhys
The last integer variable (ipmem_start) will have the amount of memory in bytes.
Harry Bell
use dfwin
use dflogm
use dfcom
(not sure which one of these is required)
...
type(T_MEMORYSTATUS) lpMstMemStat
...
call GlobalMemoryStatus ( lpMstMemStat )
ipmem_start = lpMstMemStat.dwAvailPhys
The last integer variable (ipmem_start) will have the amount of memory in bytes.
Harry Bell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that physical memory is not the same as virtual memory. The dwTotalVirtual and dwAvailVirtiual fields are more interesting here.
Steve
Steve

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