MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / parseMacMemGB

Function parseMacMemGB

src/setup/offload-detect.ts:25–28  ·  view source on GitHub ↗
(stdout: string)

Source from the content-addressed store, hash-verified

23
24/** `sysctl -n hw.memsize` (bytes) → GB of total RAM (Apple Silicon shares it with the GPU). */
25export function parseMacMemGB(stdout: string): number | null {
26 const bytes = parseInt(stdout.trim(), 10);
27 return Number.isFinite(bytes) && bytes > 0 ? bytes / 1024 ** 3 : null;
28}
29
30/** Pull the transformer block count out of an Ollama /api/show `model_info` map. The key is
31 * arch-prefixed (e.g. `qwen3.block_count`, `llama.block_count`), so match on the suffix. PURE. */

Callers 2

detectVramGBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected