Loading
Commits on Source 3
-
cznic authored
Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com>
-
cznic authored
Diagnosis of the missing page retention hysteresis in UintptrFree. Also drops the now-stale "untracked" qualifier from CLAUDE.md. Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com>
-
cznic authored
UintptrFree now keeps a drained shared page as the carve target of its size class instead of returning it to the OS at once. A workload that repeatedly drains a size class no longer pays a mmap/munmap round trip per turnover: an alloc/free loop at 64 B or 4 KiB drops from 200,024 mmaps and 600,000 munmaps to a single allocator page. Retention is bounded by one empty page per class. Trim hands the retained pages back. Tests and benchmarks call it before asserting the counters and the mapping set are zero, so those assertions keep their full strength; asserting after Close instead would be vacuous, as Close ends with *a = Allocator{}. Pages backing a single big allocation are unmapped immediately, as before. See HANDOFF.md for the diagnosis and the measurements. Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com>