mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
17 lines
381 B
C
17 lines
381 B
C
#include "memory.h"
|
|
|
|
#include <windows.h>
|
|
|
|
const char* ffDetectMemory(FFMemoryResult* ram)
|
|
{
|
|
MEMORYSTATUSEX statex = {
|
|
.dwLength = sizeof(statex),
|
|
};
|
|
if (!GlobalMemoryStatusEx(&statex))
|
|
return "GlobalMemoryStatusEx() failed";
|
|
|
|
ram->bytesTotal = statex.ullTotalPhys;
|
|
ram->bytesUsed = statex.ullTotalPhys - statex.ullAvailPhys;
|
|
return NULL;
|
|
}
|