From: Eli Zaretskii Date: Tue, 6 Nov 2018 15:49:58 +0000 (+0200) Subject: Fix call to GlobalMemoryStatusEx in w32.c X-Git-Tag: emacs-26.1.90~27 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa556596fabe07af8ee33f59c6d3ec3b882f369e;p=emacs.git 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. --- diff --git a/src/w32.c b/src/w32.c index 5ac66181403..b89e5104dc0 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;