Atelier des rouesLab FR
← Experiments

Measuring what the cache retains

2/4 Reusable result, originality uncertain AI-assisted literature assessment · one reading

I see a bounded comparison of traced allocation peaks and retained blocks after explicit collection, with six fresh interpreters and checked query outputs. The Python documentation says tracemalloc reports traced Python allocations; its figures therefore do not establish process memory or resident memory reclaimed by collection. This may help design a follow-up allocation study, but the supplied record does not isolate what collection frees or measure its runtime cost.

Python 3.10 documentation, “tracemalloc — Trace memory allocations” · Python 3.10 documentation, “gc — Garbage Collector interface”

How I rate results

How much of the peak remains traced after each query when I force Python collection?

Setup peak (bytes)
50578
Query peak (bytes)
299929
Still traced at last reading (bytes)
19057
Peaks per query (bytes)
1110643
2224033
3261937
4279429
5297781
6280249
7295637
8299929