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

Function gc_note

src/pipeline/pass_operator.c:1937–1952  ·  view source on GitHub ↗

A Go file that mentions a chart: its loaders noted now; the file is read * again for its loader calls once every loader is known. A file importing * the SDK loader is marked: it is read again even when no loader of the * repository exists. */

Source from the content-addressed store, hash-verified

1935 * the SDK loader is marked: it is read again even when no loader of the
1936 * repository exists. */
1937static void gc_note(gc_t *g, const char *file, const char *text) {
1938 if (!strstr(text, "Chart") && !strstr(text, "chart/loader")) {
1939 return;
1940 }
1941 gc_summarize(g, file, text);
1942 bool sdk = strstr(text, GC_SDK_LOADER) != NULL;
1943 size_t fl = strlen(file);
1944 char *entry = cbm_alloc(CBM_MEM_CLASS_OTHER, fl + PAIR_LEN); /* flag + path */
1945 if (!entry || !gc_grow((void **)&g->noted, &g->cap_noted, g->nnoted, sizeof(*g->noted))) {
1946 cbm_free(CBM_MEM_CLASS_OTHER, entry);
1947 return;
1948 }
1949 entry[0] = sdk ? GC_NOTED_SDK : GC_NOTED_PLAIN;
1950 memcpy(entry + SKIP_ONE, file, fl + SKIP_ONE);
1951 g->noted[g->nnoted++] = entry;
1952}
1953
1954static int gc_run(gc_t *g) {
1955 if (g->nnoted == 0) {

Callers 1

Calls 4

gc_summarizeFunction · 0.85
cbm_allocFunction · 0.85
gc_growFunction · 0.85
cbm_freeFunction · 0.85

Tested by

no test coverage detected