Jump to content

  • Log In with Google      Sign In   
  • Create Account

[winapi] to check avaliable memory


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   -  Reputation: -456

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 ?

 

 



Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9670

Like
2Likes
Like

Posted 25 August 2013 - 09:14 AM

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

#3 Endurion   Crossbones+   -  Reputation: 3685

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   -  Reputation: -456

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.



PARTNERS