Skip to content

Commit 986baba

Browse files
committed
util/oslib-win32: add qemu_get_host_physmem implementation
Compile tested only. Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Stefan Weil <[email protected]> Message-Id: <[email protected]>
1 parent ad06ef0 commit 986baba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

util/oslib-win32.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,11 @@ char *qemu_get_host_name(Error **errp)
831831

832832
size_t qemu_get_host_physmem(void)
833833
{
834-
/* currently unimplemented */
834+
MEMORYSTATUSEX statex;
835+
statex.dwLength = sizeof(statex);
836+
837+
if (GlobalMemoryStatusEx(&statex)) {
838+
return statex.ullTotalPhys;
839+
}
835840
return 0;
836841
}

0 commit comments

Comments
 (0)