MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getSystemTotalMb

Function getSystemTotalMb

packages/engine/src/services/systemMemory.ts:140–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139/** Total physical RAM in MiB. */
140export function getSystemTotalMb(): number {
141 const hostTotalMb = Math.floor(totalmem() / BYTES_PER_MIB);
142 const cgroupLimitMb = getCgroupLimitMb();
143
144 return cgroupLimitMb === null ? hostTotalMb : Math.min(hostTotalMb, cgroupLimitMb);
145}
146
147/**
148 * Total-RAM ceiling (MiB) at or below which the host is treated as

Callers 10

executeRenderJobFunction · 0.90
getSystemMetaFunction · 0.90
memoryAdaptiveCacheLimitFunction · 0.85
calculateOptimalWorkersFunction · 0.85
getSystemResourcesFunction · 0.85
isLowMemorySystemFunction · 0.85
getGpuMemBudgetMbFunction · 0.85
getLowMemoryFlagsFunction · 0.85

Calls 1

getCgroupLimitMbFunction · 0.85

Tested by

no test coverage detected