MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / detect_system_windows

Function detect_system_windows

src/foundation/system_info.c:247–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245
246#ifdef _WIN32
247static cbm_system_info_t detect_system_windows(void) {
248 cbm_system_info_t info;
249 memset(&info, 0, sizeof(info));
250
251 SYSTEM_INFO si;
252 GetSystemInfo(&si);
253 info.total_cores = (int)si.dwNumberOfProcessors;
254 if (info.total_cores < 1) {
255 info.total_cores = SKIP_ONE;
256 }
257 info.perf_cores = info.total_cores;
258
259 MEMORYSTATUSEX ms;
260 ms.dwLength = sizeof(ms);
261 if (GlobalMemoryStatusEx(&ms)) {
262 info.total_ram = (size_t)ms.ullTotalPhys;
263 }
264
265 return info;
266}
267#endif
268
269/* ── Public API ──────────────────────────────────────────────────── */

Callers 1

detect_system_nowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected