From 99c3cda01a4bb4d1f08b93753ff3b79bcbc3e63e Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 25 Aug 2022 09:38:49 +0200 Subject: Windows: use newer MEMORYSTATUSEX structure in call to GlobalMemoryStatusEx --- src/Common/Random.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Common/Random.c b/src/Common/Random.c index d5c09848..fd836c7f 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -830,7 +830,7 @@ BOOL FastPoll (void) FILETIME creationTime, exitTime, kernelTime, userTime; SIZE_T minimumWorkingSetSize, maximumWorkingSetSize; LARGE_INTEGER performanceCount; - MEMORYSTATUS memoryStatus; + MEMORYSTATUSEX memoryStatus; HANDLE handle; POINT point; @@ -871,9 +871,9 @@ BOOL FastPoll (void) /* Get percent of memory in use, bytes of physical memory, bytes of free physical memory, bytes in paging file, free bytes in paging file, user bytes of address space, and free user bytes */ - memoryStatus.dwLength = sizeof (MEMORYSTATUS); + memoryStatus.dwLength = sizeof (MEMORYSTATUSEX); GlobalMemoryStatusEx (&memoryStatus); - RandaddBuf ((unsigned char *) &memoryStatus, sizeof (MEMORYSTATUS)); + RandaddBuf ((unsigned char *) &memoryStatus, sizeof (MEMORYSTATUSEX)); /* Get thread and process creation time, exit time, time in kernel mode, and time in user mode in 100ns intervals */ -- cgit v1.2.3