Memory allocation issues
I'm trying to think about how could an app scale it's memory usage on a win32 platform and I have a few questions about this:
- can I know how much free RAM memory is there?
- can I control what pages of memory go to the virtual memory zone on the hard disk?
- can I demand/suggest Windows to keep a certain memory zone in RAM?
- what is the pro way of doing this? (I'm thinking large memory allocation at start, then swapping with the hardisk managed by the app according to it's needs)
Any articles on this issue are welcome.
Edited by - Diodor on November 21, 2001 2:45:07 AM
- can I know how much free RAM memory is there?
NO
can I control what pages of memory go to the virtual memory zone on the hard disk?
YES
- can I demand/suggest Windows to keep a certain memory zone in RAM?
YES
what is the pro way of doing this?
Depends on which pro you talk too. I''ve been reading Richter''s book. You''ll want to look into the VirtualAlloc family of memory API''s - some of the flags aren''t implemented on W9x. If your prog will use less than 4 Mb of memory the Heap functions are much easier. If you want to use vast amounts of memory - mem mapped files are the way to go.
Most of what you want to do is possible but probably not with the kind of precise control that you want.
NO
can I control what pages of memory go to the virtual memory zone on the hard disk?
YES
- can I demand/suggest Windows to keep a certain memory zone in RAM?
YES
what is the pro way of doing this?
Depends on which pro you talk too. I''ve been reading Richter''s book. You''ll want to look into the VirtualAlloc family of memory API''s - some of the flags aren''t implemented on W9x. If your prog will use less than 4 Mb of memory the Heap functions are much easier. If you want to use vast amounts of memory - mem mapped files are the way to go.
Most of what you want to do is possible but probably not with the kind of precise control that you want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement