Repository navigation
release: rusty_alloc 2.7.0 — Windows commit footprint (#63), zero panic sites - #65
Merged
Merged
Conversation
…uard off where proven Windows (issue 63): peak commit within 1.07-1.29x of the Windows heap on ninja, OpenTTD and the Godot editor (2.6.0: 1.4-2.7x), with no speed traded. Medium pages and a class's first small page commit as they fill, large blocks commit to their last OS page, giant blocks commit what they reach, a segment commits 256 KiB ahead of its cursor, a partly purged span commits only the part taken, and a heap purges free spans it has seen unused for a whole purge_delay (all platforms). Fixed: a resident span merged with a purged neighbour was never purged; the abandoned-segment purge read the wrong option since 0.3.0; Heap::visit_blocks misplaced huge blocks. Optimization round: thread exit and start-up (no /dev/urandom read until first draw, no delayed purge of a dying thread's spans, committed-prefix chunk reuse), realloc copies up to 128 bytes inline and grows large blocks in place, calloc skips zeroing of decommitted spans, collect sweeps only live bin queues. Panic sites reachable from an Allocator method: 28 -> 0, counted under fat LTO and, new, under Cargo's default release profile (GOT-resolved). Bins and subprocess ids out of range abort; walks go by pointer; std paths that can panic replaced. rusty_alloc::NO_UNWIND_PROVEN (x86-64 Linux, release, opt-level 2/3 via a new build.rs, default features) lets rusty_alloc_api drop its abort-on-unwind guard: Vec::new_in(RustyAlloc) -27.6 Ir/step. Every other instrument unchanged, outputs identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changelogs, version bump, and the READMEs' performance sections refreshed from a full corpus run on 2026-12-02 (callgrind, Rust 1.100): real programs against mimalloc, jemalloc and glibc, the 23-operation scan, the Rust GlobalAlloc/Allocator workloads, and Windows commit charge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The thread that reads an option first parses the environment and writes the whole option table after the ENV_PARSED swap, so other threads already take the fast path. A set() from one of them during the pass was then overwritten with the default. Windows CI hit it as a one-in-five failure of tests/heaps.rs generic_collect_fires_on_its_own: generic_collect lowered to 8 came back as 10,000, so the periodic collect never fired. 2.7.0 exposed it because a new heap now reads that option once, when it is created. The pass now fills only slots still holding the i64::MIN sentinel (environment first, then defaults), so an explicit set always wins. Cold path only; get and set are unchanged. heaps x30 on Windows: 0 failures (1 in 5 before); the 6-config Windows matrix and clippy are clean. deny.toml: a dated, crate-scoped ignore for pin-project-lite@0.2.17. Upstream yanked every 0.2.x before 0.2.19, which the 3-day global-min-publish-age refuses until 2026-12-05. It is dev-only (loom -> tracing). Remove the ignore and `cargo update -p pin-project-lite` then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releases
rusty_alloc2.7.0 andrusty_alloc-api2.7.0.What changes
purge_delay. Peak commit against the Windows heap goes from 1.4–2.7× to 1.07–1.29× (ninja, OpenTTD, Godot editor), with no speed cost: the fault counts of free/reallocate loops are unchanged.tools/no-unwind-scan.shgates on it, and its baseline is now empty.Allocatorguard off where proven.rusty_alloc_apiskips the abort-on-unwind guard whenrusty_alloc::NO_UNWIND_PROVENholds: x86-64 Linux, release builds at opt-level 2 or 3, default features. A newbuild.rsreadsOPT_LEVELto derive that.Semver note: new pub fields on all-pub internal structs (
Heap,Page,Segment) are flagged as major by cargo-semver-checks. They ship as minor, following the 2.2.4 and 2.6.0 precedent; the CHANGELOG lists them.How it was verified
allocator_conformanceandapi_miritargets (the set CI runs). All clean.giant(+0.4%). Real programs (lua, perl, sqlite) are unchanged to 4 decimals.🤖 Generated with Claude Code