diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2020-07-24 07:44:58 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-07-27 09:40:16 +0100 |
commit | 986babaab30279a4962648d03730bf1291d89f93 (patch) | |
tree | 4532781785e94dce931d9ad2143c2f533e6d0c30 /util/oslib-win32.c | |
parent | ad06ef0efbf7cafba5074a183fef1ad586f38caa (diff) |
util/oslib-win32: add qemu_get_host_physmem implementation
Compile tested only.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-Id: <20200724064509.331-6-alex.bennee@linaro.org>
Diffstat (limited to 'util/oslib-win32.c')
-rw-r--r-- | util/oslib-win32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 31030463cc..c654dafd93 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; } |