Skip to content

feat(rallocator): select the allocation backend at startup - #996

Draft
Ralf Biedert (ralfbiedert) wants to merge 7 commits into
mainfrom
ralfbiedert-dynamic-rallocator-personality
Draft

Ralf Biedert (ralfbiedert) wants to merge 7 commits into
mainfrom
ralfbiedert-dynamic-rallocator-personality

Conversation

@ralfbiedert

Copy link
Copy Markdown
Collaborator

🤖 Install rallocator!(backend = dynamic) to choose mimalloc, snmalloc, or system with RALLOCATOR_DYNAMIC_PERSONALITY before launch. The first allocation fixes the choice for the process. Dynamic mode defaults to the system allocator when the variable is unset or empty. The existing rallocator!() form still selects snmalloc at compile time.

A recorded resize selects its backend once and records a move before releasing the old block. Ordinary allocations and frees do not read the environment after startup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (6542ec1) to head (ba8f07e).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##            main     #996      +/-   ##
=========================================
  Coverage   99.9%   100.0%              
=========================================
  Files        851      676     -175     
  Lines      74592    55900   -18692     
=========================================
- Hits       74583    55900   -18683     
+ Misses         9        0       -9     
Flag Coverage Δ
linux 100.0% <100.0%> (ø)
linux-arm 100.0% <100.0%> (ø)
scheduled ?
windows 100.0% <100.0%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

⚠️ SemVer check advisory

Potential breaking changes

cargo semver-checks flagged the following on this PR. This is informational -- breaking changes between commits are expected; the major-version bump happens at release time, not on every PR.

tick

    Checking tick v0.9.1 -> v0.9.1 (no change; assume minor)
     Checked [   0.015s] 202 checks: 198 pass, 4 fail, 0 warn, 58 skip

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/inherent_method_missing.ron

Failed in:
  Clock::with_fast_instant, previously in file crates/tick/src/clock.rs:303
  Error::is_out_of_range, previously in file crates/tick/src/error.rs:134
  SimpleClock::with_fast_instant, previously in file crates/tick/src/simple_clock.rs:97

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/module_missing.ron

Failed in:
  mod tick::fmt, previously in file crates/tick/src/fmt/mod.rs:4

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/struct_missing.ron

Failed in:
  struct tick::fmt::Iso8601, previously in file crates/tick/src/fmt/iso_8601.rs:94
  struct tick::fmt::EcmaScript, previously in file crates/tick/src/fmt/ecmascript.rs:82
  struct tick::fmt::Rfc2822, previously in file crates/tick/src/fmt/rfc_2822.rs:119
  struct tick::fmt::UnixSeconds, previously in file crates/tick/src/fmt/unix_seconds.rs:72

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/trait_missing.ron

Failed in:
  trait tick::SystemTimeExt, previously in file crates/tick/src/system_time_ext.rs:7

     Summary semver requires new major version: 4 major and 0 minor checks failed
    Finished [   0.036s] tick

Comment thread crates/rallocator/tests/dynamic.rs Fixed
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants