Jump to content
  • Advertisement

Archived

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

FrigidHelix

Checking memory available

This topic is 6416 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

How do I check to find how much memory is left for my application to mess around with? I have written a class which caches my graphics, but it needs to know at what point to start overwriting the least used stuff. I already know how to check the video memory left, what i am interested in is the system memory (where most of the directdraw surfaces likely lie)

Share this post


Link to post
Share on other sites
Advertisement

Try use the GlobalMemoryStatus function.

MEMORYSTATUS mstatus;
long FreeMemory;

GlobalMemoryStatus( &mstatus );

FreeMemory = mstatus.dwAvailPhys;

Share this post


Link to post
Share on other sites
"(where most of the directdraw surfaces likely lie)"

If this is true, your game is going to be slow.

Try to keep your most used graphics in video memory.


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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!