Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(foundation): use HW_PHYSMEM for physical memory detection on FreeBSD

Pedro Ramos345ed4d3bccc
diff --git a/src/foundation/system_info.c b/src/foundation/system_info.c
index 21e0a9cb3..8ba237f6c 100644
--- a/src/foundation/system_info.c
+++ b/src/foundation/system_info.c
@@ -95,7 +95,7 @@ static cbm_system_info_t detect_system_bsd(void) {
info.total_cores = nprocs > 0 ? (int)nprocs : 1;
info.perf_cores = info.total_cores;
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
int mib[2] = {CTL_HW, HW_PHYSMEM};
#else
int mib[2] = {CTL_HW, HW_PHYSMEM64};