Menu

#310 IOSOperator::getSysteMemory() returns incorrect values with >2GB

closed-fixed
5
2017-03-25
2016-02-09
No

Under Windows, the method getSystemMemory of the class IOSOperator uses the system call GlobalMemoryStatus, which returns incorrect data if the physical RAM present is more than 2GB and overflows if there are more than 4GB.
I made the method to use GlobalMemoryStatusEx, which works correctly with any amount of RAM installed. It's present since Windows XP, so there shouldn't be compatibility problems.
However the method return values are still u32 types, so it will work correctly only with less than 4 Terabytes of RAM present. Should be enough for everyone though (tm)

Enclosed the DIFF file

1 Attachments

Discussion

  • Michael Zeilfelder

    • status: open --> closed-fixed
    • assigned_to: Michael Zeilfelder
     
  • Michael Zeilfelder

    Thanks! Applied in Irrlicht 1.8 release branch in revision 5376 (merge with trunk will follow soon).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.