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

Function mem_setup_fatal

src/foundation/mem.c:165–170  ·  view source on GitHub ↗

Allocator setup is not best-effort. A misconfigured allocator does not * degrade gracefully — it grows without bound until the OS kills the process * (#581 ran for months exactly this way, silently). So every step of the setup * is VERIFIED and a failure is fatal here rather than a slow death later. * There is deliberately no timeout or retry: these checks are synchronous, so * "not true yet"

Source from the content-addressed store, hash-verified

163 * There is deliberately no timeout or retry: these checks are synchronous, so
164 * "not true yet" and "never going to be true" are the same answer. */
165static void mem_setup_fatal(const char *what, const char *detail) {
166 cbm_log_error("mem.allocator.setup_failed", "check", what, "detail", detail);
167 /* Never continue with an allocator that cannot return memory: unbounded
168 * growth is a worse failure than refusing to start. */
169 abort();
170}
171
172/* Set an option and prove it took effect; a silently-ignored option is the
173 * failure mode that made #581 invisible. */

Callers 2

mem_option_set_verifiedFunction · 0.85
cbm_mem_init_with_capFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected