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>
This commit is contained in:
Alex Bennée 2020-07-24 07:44:58 +01:00
parent ad06ef0efb
commit 986babaab3

View File

@ -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;
}