Fix call to GlobalMemoryStatusEx in w32.c
* src/w32.c (system_process_attributes): Initialize the size of the data structure passed to GlobalMemoryStatusEx, otherwise it fails.
This commit is contained in:
parent
6937c35d32
commit
aa556596fa
1 changed files with 1 additions and 0 deletions
|
@ -7157,6 +7157,7 @@ system_process_attributes (Lisp_Object pid)
|
||||||
code_convert_string_norecord (tem, Vlocale_coding_system, 0)),
|
code_convert_string_norecord (tem, Vlocale_coding_system, 0)),
|
||||||
attrs);
|
attrs);
|
||||||
|
|
||||||
|
memstex.dwLength = sizeof (memstex);
|
||||||
if (global_memory_status_ex (&memstex))
|
if (global_memory_status_ex (&memstex))
|
||||||
#if __GNUC__ || (defined (_MSC_VER) && _MSC_VER >= 1300)
|
#if __GNUC__ || (defined (_MSC_VER) && _MSC_VER >= 1300)
|
||||||
totphys = memstex.ullTotalPhys / 1024.0;
|
totphys = memstex.ullTotalPhys / 1024.0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue