emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 aa55659: Fix call to GlobalMemoryStatusEx in w32.


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 aa55659: Fix call to GlobalMemoryStatusEx in w32.c
Date: Tue, 6 Nov 2018 10:50:46 -0500 (EST)

branch: emacs-26
commit aa556596fabe07af8ee33f59c6d3ec3b882f369e
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 src/w32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/w32.c b/src/w32.c
index 5ac6618..b89e510 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -7157,6 +7157,7 @@ system_process_attributes (Lisp_Object pid)
                         code_convert_string_norecord (tem, 
Vlocale_coding_system, 0)),
                 attrs);
 
+  memstex.dwLength = sizeof (memstex);
   if (global_memory_status_ex (&memstex))
 #if __GNUC__ || (defined (_MSC_VER) && _MSC_VER >= 1300)
     totphys = memstex.ullTotalPhys / 1024.0;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]