diff options
Diffstat (limited to 'util/oslib-win32.c')
| -rw-r--r-- | util/oslib-win32.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 7eedbe5859..c654dafd93 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -828,3 +828,14 @@ char *qemu_get_host_name(Error **errp) return g_utf16_to_utf8(tmp, size, NULL, NULL, NULL); } + +size_t qemu_get_host_physmem(void) +{ + MEMORYSTATUSEX statex; + statex.dwLength = sizeof(statex); + + if (GlobalMemoryStatusEx(&statex)) { + return statex.ullTotalPhys; + } + return 0; +} |