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

Function detect_system_windows

src/foundation/system_info.c:240–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

cbm_system_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected