Skip to main content
GameDev.net gamedev.net
🔒 Locked

Checking memory available

Started by FrigidHelix Nov 24, 2000 at 8:43 PM 1 replies 350+ views
Original Post
FrigidHelix
FrigidHelix
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)
Jr
Jr

Try use the GlobalMemoryStatus function.

MEMORYSTATUS mstatus;
long FreeMemory;

GlobalMemoryStatus( &mstatus );

FreeMemory = mstatus.dwAvailPhys;
Darrell
Darrell
"(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.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.