Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Diodor

Memory allocation issues

This topic is 6085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
- 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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!