Measuring how much memory a program really uses
What the task manager shows versus what a program holds. A real case where a cache held a 14.74 GB model in memory between prompts, and how heaptide finds leaks, growth and holders in one run.
Posts with this tag: 19
What the task manager shows versus what a program holds. A real case where a cache held a 14.74 GB model in memory between prompts, and how heaptide finds leaks, growth and holders in one run.
The text encoder is a language model of its own, 4.8 GB for our picture model and 14.74 GB for our video model. Its output is cached per prompt, and a cache hit never loads it at all.
You do not need special software to start a memory for your AI agent. A folder, dated Markdown notes, a Related list and one habit are enough. This article gives six steps, a note template and the rule that makes an agent use the vault.
Text encoder, drawing model and VAE each take gigabytes. Smaller weights and the right cache setting freed memory: RAM after a shot fell from 31.7 GB to 3.1 GB and a warm shot went from 85 to 49 seconds.
Mapping a file costs almost nothing up front, because the system loads pages only when you touch them. On 50,000 tensors, mojo-safetensors opened a file in 51 ms against 164 s for the Python reference.
Agents have no memory between sessions unless you give them some. This article explains why they forget, what a written memory fixes, and a test of ours where a helpful hint made no measurable difference.
A 21 GB model on a 24 GB card fits, barely. Add a long chat or a desktop and it does not. We show the sums with our own numbers, including a 14.74 GB leak that hid in plain sight.
A folder of notes is a pile. Add dates and links and it becomes a map. This article explains the idea behind BrainNet: why a note is treated like a neuron, a link like a synapse, and what that lets an agent find.
One heaptide run gives one report: what was never freed, whether memory keeps rising, and who holds it. In our benchmark it took 0.13 s where heaptrack took 1.65 s.
The merged network now holds 1,855,596 neurons in 3.50 GB of core files, and its resident rank server uses 747 MB after 88 questions. Our skill file said about 0.5 GB, and the files have grown faster than the neuron count.
The fix removed the sky from the ward frame and made each render slower and heavier. The cheaper render had been wrong, and the fix is the one we keep.
A memory census named the holder: the CLIP object in the CLIPLoader cache entry. A cache hit skipped the encoder load, RAM after a shot fell from 31.7 GB to 3.1 GB, and the warm shot took 49 s instead of 85 s. About 15 GB of the memory is still unattributed.
Every commit to our notes used to rebuild the whole network in 49 seconds and 8.40 GB. Four changes brought a warm refresh to about 16 seconds and 5.78 GB on 2026-11-06. On 2026-11-19 the warm refresh took 15.6 seconds but peaked at 7.40 GB, which fails our 6.5 GB line. An unchanged input costs 1.5 seconds.
A small learned memory predicted which files an agent would touch next at recall@5 0.599, against 0.534 for the usual rule. In a live A/B over 1,090 matched turns it changed nothing we could detect. Seven rules came out of the same week's rebuild and lock work.
On our own vault, every network idea tied plain search at 23 of 29 and 17 of 30. Bridges, usage synapses, learned weights, Hebbian plasticity and a graph inside the model were all killed against a kill line set in advance.
Spreading activation recovered 13.0 percent more held-out Wikipedia links on 1.18M articles, a local model found 42 extra hidden note links, and hub damping cut hub pages in paper answers from 22 slots to 9. The accuracy gain in brain-ask itself came from the reranker.
Agents must recall before they hypothesize. The vault's rules, a walk tool, skill hooks and a per-repo network turn the memory into something an agent uses every turn, including on an older laptop without Mojo.
brain-ask finds seed notes by meaning, spreads activation along synapses with personalized PageRank, then lets a cross-encoder pick five. On the Wikipedia network we cut a question from 5.3 s to 0.69 s by firing 2,618 neurons instead of 1,175,258.
Our memory is a vault of Markdown notes. BrainNet reads it as a graph, with notes as neurons and links as synapses, then merges notes, papers, code and docs into one network of 1,640,443 neurons.