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

Function render_node_limit

src/ui/layout3d.c:179–194  ·  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

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

Callers 1

clamp_max_nodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected