Commits on Source 3

  • cznic's avatar
    add CLAUDE.md · dc7170a0
    cznic authored
    Co-Authored-By: default avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    dc7170a0
  • cznic's avatar
    add HANDOFF.md · 51c2dca0
    cznic authored
    Diagnosis of the missing page retention hysteresis in UintptrFree. Also
    drops the now-stale "untracked" qualifier from CLAUDE.md.
    
    Co-Authored-By: default avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    51c2dca0
  • cznic's avatar
    retain one empty page per size class, add Trim · 5d9224a0
    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: default avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    5d9224a0
Loading
Loading