-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIN] fix reporting system memory > 4GB. Need to use GlobalMemoryEx/M…
…EMORYSTATUSEX instead of GlobalMemory
- Loading branch information
CrystalP
authored and
CrystalP
committed
Jan 2, 2012
1 parent
396fc2d
commit ee1a1e2
Showing
7 changed files
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,9 +434,10 @@ namespace PYXBMC | |
|
||
PyObject* XBMC_GetFreeMem(PyObject *self, PyObject *args) | ||
{ | ||
MEMORYSTATUS stat; | ||
GlobalMemoryStatus(&stat); | ||
return PyInt_FromLong( stat.dwAvailPhys / ( 1024 * 1024 ) ); | ||
MEMORYSTATUSEX stat; | ||
stat.dwLength = sizeof(MEMORYSTATUSEX); | ||
GlobalMemoryStatusEx(&stat); | ||
return PyInt_FromLong( stat.ullAvailPhys / ( 1024 * 1024 ) ); | ||
This comment has been minimized.
Sorry, something went wrong.
arnova
Member
|
||
} | ||
|
||
// getCpuTemp() method | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit ee1a1e2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the trouble, thanks for fixing up.
That won't break Linux/OSX?
We had this already in but somehow it vanished.