mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-08 08:53:43 +08:00
The memory-core linter is a ratchet: raw malloc/calloc/realloc/free/strdup sites may not grow, because allocations belong on one accounted path (src/foundation/mem_core.h) rather than spread across hundreds of call sites. This branch's own work had added 35 raw sites across nine files -- the parallel k8s prep, the configlink key matching, the worker pool's counted path, the Go shared stdlib registry, the spill namespace copy, the route service array and the namespace-name arrays. All of them now use cbm_alloc/cbm_calloc/cbm_realloc/cbm_free/ cbm_mem_strdup. One was a latent bug rather than a style point: pass_k8s freed a buffer that k8s_read_file had allocated with raw malloc, so converting only the free would have mismatched the allocator -- the read function and every free of its result are converted together. The Windows free-space path widens its argument through the memory core instead of cbm_utf8_to_wide(), which allocates with raw malloc. Two files improved enough to tighten their baselines, which the ratchet requires so the gain cannot be quietly given back: sqlite_writer.c 92->74 (the index-cell arena), pass_k8s.c 13->6 and registry.c 19->17. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
91 lines
2.6 KiB
Plaintext
91 lines
2.6 KiB
Plaintext
# memory-core-baseline.txt -- raw allocator call sites per file.
|
|
# Generated by scripts/lint-memory-core.py --write-baseline.
|
|
# A file may only ever go DOWN. Lower a line in the same change that
|
|
# migrates the file to src/foundation/mem_core.h; never raise one.
|
|
|
|
internal/cbm/ac.c 20
|
|
internal/cbm/arena.c 3
|
|
internal/cbm/cbm.c 13
|
|
internal/cbm/extract_defs.c 5
|
|
internal/cbm/helpers.c 3
|
|
internal/cbm/lsp/c_lsp.c 4
|
|
internal/cbm/lsp/perl_lsp.c 21
|
|
internal/cbm/lsp/py_lsp.c 2
|
|
internal/cbm/macro_table.c 1
|
|
internal/cbm/service_patterns.c 2
|
|
internal/cbm/sqlite_writer.c 74
|
|
src/cli/activation_transaction.c 80
|
|
src/cli/agent_clients.c 73
|
|
src/cli/agent_profiles.c 7
|
|
src/cli/cli.c 173
|
|
src/cli/client_adapter.c 3
|
|
src/cli/config_edit_path.c 2
|
|
src/cli/config_json_like.c 142
|
|
src/cli/config_text_edit.c 72
|
|
src/cli/config_toml_edit.c 85
|
|
src/cli/config_yaml_edit.c 117
|
|
src/cli/hook_augment.c 31
|
|
src/cypher/cypher.c 132
|
|
src/daemon/application.c 107
|
|
src/daemon/bootstrap.c 13
|
|
src/daemon/daemon.c 31
|
|
src/daemon/frontend.c 12
|
|
src/daemon/ipc.c 146
|
|
src/daemon/project_lock.c 6
|
|
src/daemon/runtime.c 45
|
|
src/daemon/service.c 6
|
|
src/daemon/version_cohort.c 9
|
|
src/discover/discover.c 31
|
|
src/discover/gitignore.c 12
|
|
src/discover/userconfig.c 15
|
|
src/foundation/diagnostics.c 7
|
|
src/foundation/lock_registry.c 18
|
|
src/foundation/platform.c 11
|
|
src/foundation/platform.h 5
|
|
src/foundation/private_file_lock.c 56
|
|
src/foundation/str_intern.c 7
|
|
src/foundation/subprocess.c 24
|
|
src/foundation/win_utf8.h 17
|
|
src/foundation/workspace.c 3
|
|
src/foundation/yaml.c 10
|
|
src/git/git_context.c 18
|
|
src/main.c 32
|
|
src/mcp/compact_out.c 39
|
|
src/mcp/index_supervisor.c 8
|
|
src/mcp/mcp.c 814
|
|
src/pipeline/artifact.c 38
|
|
src/pipeline/fqn.c 23
|
|
src/pipeline/lsp_resolve.h 4
|
|
src/pipeline/lsp_surface.c 5
|
|
src/pipeline/pass_calls.c 23
|
|
src/pipeline/pass_compile_commands.c 17
|
|
src/pipeline/pass_complexity.c 15
|
|
src/pipeline/pass_configlink.c 3
|
|
src/pipeline/pass_cross_repo.c 8
|
|
src/pipeline/pass_definitions.c 14
|
|
src/pipeline/pass_enrichment.c 15
|
|
src/pipeline/pass_ensemble_routing.c 10
|
|
src/pipeline/pass_envscan.c 2
|
|
src/pipeline/pass_githistory.c 27
|
|
src/pipeline/pass_importance.c 4
|
|
src/pipeline/pass_infrascan.c 2
|
|
src/pipeline/pass_k8s.c 6
|
|
src/pipeline/pass_lsp_cross.c 50
|
|
src/pipeline/pass_parallel.c 31
|
|
src/pipeline/pass_pkgmap.c 82
|
|
src/pipeline/pass_semantic.c 3
|
|
src/pipeline/pass_tests.c 3
|
|
src/pipeline/pass_usages.c 4
|
|
src/pipeline/path_alias.c 42
|
|
src/pipeline/pipeline.c 134
|
|
src/pipeline/pipeline_delta.c 19
|
|
src/pipeline/pipeline_incremental.c 144
|
|
src/pipeline/registry.c 17
|
|
src/pipeline/worker_pool.c 2
|
|
src/store/store.c 358
|
|
src/ui/config.c 12
|
|
src/ui/http_server.c 31
|
|
src/ui/httpd.c 21
|
|
src/ui/layout3d.c 66
|
|
src/watcher/watcher.c 33
|