Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

[winapi] to check avaliable memory

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 / fir   Members   

-460
Like
0Likes
Like

Posted 25 August 2013 - 08:36 AM

Is there a call in winapi for checking the amount of avaliable memory?

Second question, if I got build a c/winapi program which use a 700 MB

of static data/tables what with it result like when running on 500 MB

machine ?

 

 



#2 SiCrane   Moderators   

11765
Like
2Likes
Like

Posted 25 August 2013 - 09:14 AM

You can use GlobalMemoryStatus() or GlobalMemoryStatusEx() to find out available memory.

#3 Endurion   Members   

5322
Like
1Likes
Like

Posted 25 August 2013 - 11:07 AM

Depending on how you allocate that memory Windows will let you do that (use more memory than is physically available).

 

Back in the old days of yore (Win 3.11) I could load and scroll on a 8 MB bitmap on a 4 MB machine. No, it was not particularely fluid, but it worked.

 

 

Checking the state is good, however having a forced abort is not. Even if you deem memory not sufficient, let it run (maybe with a warning).


Edited by Endurion, 25 August 2013 - 11:07 AM.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

#4 / fir   Members   

-460
Like
0Likes
Like

Posted 28 August 2013 - 12:58 AM

grreat, tnx for answers 






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.