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

Function mem_phase_committed

src/foundation/mem.c:898–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896static atomic_int g_mem_phase_enabled = ATOMIC_VAR_INIT(-1); /* -1 = undecided */
897
898static size_t mem_phase_committed(void) {
899 size_t elapsed_ms = 0;
900 size_t user_ms = 0;
901 size_t sys_ms = 0;
902 size_t rss = 0;
903 size_t peak_rss = 0;
904 size_t commit = 0;
905 size_t peak_commit = 0;
906 size_t faults = 0;
907 mi_process_info(&elapsed_ms, &user_ms, &sys_ms, &rss, &peak_rss, &commit, &peak_commit,
908 &faults);
909 return commit;
910}
911
912static bool mem_phase_enabled(void) {
913 int state = atomic_load_explicit(&g_mem_phase_enabled, memory_order_acquire);

Callers 2

cbm_mem_phase_markFunction · 0.85
cbm_mem_phase_resetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected