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

Function update_peak

src/foundation/vmem.c:98–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96/* ── Update peak ───────────────────────────────────────────────── */
97
98static void update_peak(size_t allocated) {
99 size_t old_peak = atomic_load(&g_peak);
100 while (allocated > old_peak) {
101 if (atomic_compare_exchange_weak(&g_peak, &old_peak, allocated)) {
102 break;
103 }
104 }
105}
106
107/* ── Public API ────────────────────────────────────────────────── */
108

Callers 1

cbm_vmem_allocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected