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

Function gmt_budget_pin

tests/test_graph_mem.c:215–219  ·  view source on GitHub ↗

The runner initializes no memory budget unless the mem suite ran first, and * without one no layer is ever built. Each test pins a budget the 3 KB fixture * layer fits, collects its observations, and restores the budget BEFORE * asserting (the hook's contract: a failed assert must not leak the budget). */

Source from the content-addressed store, hash-verified

213 * layer fits, collects its observations, and restores the budget BEFORE
214 * asserting (the hook's contract: a failed assert must not leak the budget). */
215static size_t gmt_budget_pin(size_t bytes) {
216 size_t saved = cbm_mem_budget();
217 cbm_mem_set_budget_for_tests(bytes);
218 return saved;
219}
220
221static size_t gmt_budget_roomy(void) {
222 return cbm_mem_charged() + ((size_t)1 << 30);

Callers 2

gmt_open_sql_referenceFunction · 0.85
test_graph_mem.cFile · 0.85

Calls 2

cbm_mem_budgetFunction · 0.85

Tested by

no test coverage detected