Compile tested only. Signed-off-by: Alex Bennée <alex.ben...@linaro.org> Reviewed-by: Stefan Weil <s...@weilnetz.de> Message-Id: <20200724064509.331-6-alex.ben...@linaro.org>
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 31030463cc9..c654dafd937 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -831,6 +831,11 @@ char *qemu_get_host_name(Error **errp) size_t qemu_get_host_physmem(void) { - /* currently unimplemented */ + MEMORYSTATUSEX statex; + statex.dwLength = sizeof(statex); + + if (GlobalMemoryStatusEx(&statex)) { + return statex.ullTotalPhys; + } return 0; } -- 2.20.1