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

Function render_node_limit

src/ui/layout3d.c:182–197  ·  view source on GitHub ↗

Ceiling for a caller-requested node budget. CBM_UI_MAX_RENDER_NODES lowers * (or raises, up to HARD_MAX_NODES) the ceiling for constrained deployments; * without it the full hard ceiling is available to explicit requests. */

Source from the content-addressed store, hash-verified

180 * (or raises, up to HARD_MAX_NODES) the ceiling for constrained deployments;
181 * without it the full hard ceiling is available to explicit requests. */
182static int render_node_limit(void) {
183 const char *raw = cbm_runtime_getenv("CBM_UI_MAX_RENDER_NODES");
184 if (!raw || !raw[0]) {
185 return HARD_MAX_NODES;
186 }
187 errno = 0;
188 char *end = NULL;
189 long v = strtol(raw, &end, 10);
190 if (errno != 0 || end == raw || *end != '\0' || v <= 0) {
191 return HARD_MAX_NODES;
192 }
193 if (v > HARD_MAX_NODES) {
194 return HARD_MAX_NODES;
195 }
196 return (int)v;
197}
198
199/* The default is a default, not a ceiling: an explicit request is honored up
200 * to the (env-adjustable) ceiling; only a missing/invalid request falls back

Callers 1

clamp_max_nodesFunction · 0.85

Calls 1

cbm_runtime_getenvFunction · 0.85

Tested by

no test coverage detected