calculate overhead based number of gpu devices (#1875)

This commit is contained in:
Jeffrey Morgan
2024-01-09 15:53:33 -05:00
committed by GitHub
parent e89dc1d54b
commit c336693f07
8 changed files with 13 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ void cpu_check_ram(mem_info_t *resp) {
MEMORYSTATUSEX info;
info.dwLength = sizeof(info);
if (GlobalMemoryStatusEx(&info) != 0) {
resp->count = 1;
resp->total = info.ullTotalPhys;
resp->free = info.ullAvailPhys;
} else {
@@ -26,6 +27,7 @@ void cpu_check_ram(mem_info_t *resp) {
if (sysinfo(&info) != 0) {
resp->err = strdup(strerror(errno));
} else {
resp->count = 1;
resp->total = info.totalram * info.mem_unit;
resp->free = info.freeram * info.mem_unit;
}