Skip to content

Releases: houseme/rustfs-mimalloc

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 15:28
817b869

rustfs-mimalloc v0.7.0

mimalloc V3 (v3.5.4) bindings for Rust.

Changed

  • Breaking (rustfs-mimalloc-profiling): the default profiling core no
    longer selects an allocator. Install SamplingAllocator<A> around the
    application's GlobalAlloc provider. Both mimalloc::MiMalloc and
    rustfs_mimalloc::MiMalloc use the same recorder and pprof implementation.

  • Keep the existing SamplingMiMalloc::new() and Default convenience API
    behind the explicit rustfs-allocator feature. Library adapters can depend
    on the core with default-features = false.

  • Keep all three crate versions synchronized at 0.7.0 and refresh the locked
    libc resolution to 0.2.191. The pinned native allocator and ABI are unchanged.

  • Restrict direct object parsing to uncompressed Linux ELF metadata, disabling
    unused format/compression features and removing the ruzstd decoder dependency.
    Backtrace symbolization keeps its existing features.

Added

  • Stateful-provider forwarding contracts for alignment, zeroing, realloc
    failure/in-place/move outcomes and cross-thread free, with deterministic
    live-record rollback checks independent of provider size classes.
  • A shared behavior/release test suite run from independent Cargo workspaces
    for both providers. Provider requirements come from root workspace dependencies;
    resolved dependency graphs reject accidental inclusion of a second allocator.
  • Default-core, optional compatibility API and dual-provider validation of the
    normalized published archive, plus stable/Rust 1.95 and platform CI checks.

Installation

[dependencies]
rustfs-mimalloc = "0.7.0"
rustfs-mimalloc-profiling = { version = "0.7.0", features = ["rustfs-allocator"] }

Full Changelog: v0.6.1...v0.7.0

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 17:10
a851308

rustfs-mimalloc v0.6.1

mimalloc V3 (v3.5.4) bindings for Rust.

Changed

  • Manage all dependency version requirements in the root
    workspace.dependencies; member crates inherit them while retaining their
    feature selections and target-platform conditions.
  • Raise the profiling test dependency libflate requirement from 2.1 to
    2.3 and refresh the workspace lockfile, including prost-derive's
    itertools 0.14 resolution.
  • Consolidate profiling release notes into this workspace changelog and link
    each crate README to the same source.

Added

  • Add a host C compiler ABI projection check for all 121 extern functions,
    nine callbacks and three exposed repr(C) layouts, complementing the
    function-name/option-ID inventory and runtime linkage tests. Negative
    controls reject return-type, callback-constness, layout-order and size-alias
    drift. CI runs the checks without adding allocator runtime overhead.
  • Refresh the three-crate functional and performance review. The latest
    mimalloc dev3 remains 6f45cc52; no new upstream API requires another
    source or binding update in this pass.

Fixed

  • Validate release metadata and changelog on stable, pin every release job to
    the same source commit, and require locked dependencies. Validate the upstream
    Pyroscope CI baseline on Rust 1.95.0; run documentation and strict lint on stable.
  • Preserve package archives before Cargo publication and verify official
    checksums when resuming an already uploaded version. Manual publication
    checks out the existing release tag for every validation and upload step.

Installation

[dependencies]
rustfs-mimalloc = "0.6.1"
rustfs-mimalloc-profiling = "0.6.1"

Full Changelog: v0.6.0...v0.6.1

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 10:51
9253b20

rustfs-mimalloc v0.6.0

mimalloc V3 (v3.5.4) bindings for Rust.

Changed

  • Pin mimalloc to upstream dev3 commit 6f45cc52 (2026-10-16 review), after the
    v3.5.4 interim tag. The C source version remains 30504. This includes
    allocation/free improvements, adaptive full-page retention, cross-thread page
    reclamation, the arena/bitmap source reorganization, and bitmap rollback
    fixes through the 2026-10-16 review. Includes naturally aligned allocation
    size-class improvements, cache offsets, OS-page heap lifecycle/visiting fixes,
    and quiescent fork support. The large-range immediate-purge default is 32 MiB.
    Workload-specific throughput and RSS still require measurement.
  • Breaking: match the experimental profiler ABI: add on_snapshot and use
    mutable heap pointers in allocation/free callbacks.
  • Breaking: make runtime option setters/toggles unsafe because upstream
    option storage is non-atomic. Configure before starting threads or exclude
    all concurrent mimalloc accesses.
  • Remove rust-version from the workspace and member manifests as requested;
    retain Rust 1.96.0 as an explicit CI compatibility check, not a Cargo MSRV.

Added

  • Add the independent rustfs-mimalloc-profiling companion crate, extracted
    from grafana/pyroscope-rs#572. It owns the sampling allocator, bounded event
    recorder, opt-in live allocation tracking, symbol/mapping resolution and
    pprof encoder. Profiler controls one recording session and returns owned
    profile bytes without an uploader or dependency on Pyroscope.

  • Move allocator behavior, optimized profile quality, stress and benchmark
    validation alongside the profiling implementation. Keep the base allocator
    dependency graph free of profiling dependencies.

  • Bound all four new upstream public APIs: mi_thread_id_of,
    mi_heap_set_debug_fill_preserve, mi_theap_delete, and
    mi_theap_quiescent_abandon. Added MiMalloc::thread_id_of,
    Heap::set_debug_fill_preserve, and unsafe ThreadHeap::quiescent_abandon.
    Context deletion remains raw FFI because it invalidates all cached aliases.

  • Added a runnable custom allocation-tracking hook example for upstream #1396,
    enabled with CFLAGS=-DMI_TRACK_CUSTOM, with no default hot-path overhead.

  • Added owner-query, quiescent foreign-context cleanup, context deletion,
    zero-initialization and direct-OS-page lifecycle regression checks.

  • Added MiMalloc::{expand,rezalloc,rezalloc_aligned}, heap zero-allocation
    and reallocation helpers, and cached ThreadHeap::{calloc,malloc_csize, zalloc_csize,realloc,rezalloc}. Added 13 previously unbound public C
    allocation APIs; zero-growth, alignment and overflow behavior are tested.

  • Added a public-header API inventory and option-ID parity check to CI,
    covering 130 Rust function names and 45 option IDs at the current pin.

  • Opt-in no_profile builds to remove allocation profiling sampling and automatic
    MIMALLOC_PROFILE startup. Statistics, alignment, security/debug checks and raw
    profiler control ABI remain available; explicit snapshots have no allocation samples.

  • MiMalloc::profiling_enabled() and MI_PROFILE_ENABLED capability queries that
    respect the linked sys crate's unified Cargo features.

  • Default/no-profile ABBA driver and tests for disabled sampling, environment
    startup, feature unification, and retained secure/debug/statistics behavior.

  • Heap::thread_local() and borrowed ThreadHeap allocation methods to avoid
    repeated TLS lookups when a worker alternates between heaps. The view cannot
    outlive its parent or be sent/shared across threads; allocations may still be
    freed on other threads. Global allocator and retention defaults are unchanged.

  • Single-heap and alternating-heap benchmarks plus an A/B/B/A driver that
    checks baseline drift and candidate repeatability before reporting a speedup.

  • Alignment, zeroing, cross-thread free, parent-deletion and compile-fail tests
    for cached heap views.

  • Raw callback registration: mi_register_error, mi_register_output, and
    mi_register_deferred_free, with lifetime/concurrency contracts.

  • Cross-thread free batch benchmarks and a Windows clang-cl C11 test job.

  • Raw mi_profiler_snapshot, mi_pprof_profiler_new, and
    mi_pprof_profiler_delete; all four profiling interval/sample-rate options.

  • Raw mi_arenas_purge and safe MiMalloc::arenas_purge() to process pending
    arena purges in the main subprocess. Expose mi_option_stats_merge_threshold
    and mi_option_arena_purge_immediate_size, plus renamed purge/stat-merge
    options and compatibility aliases for the prior Rust option names.

  • Unsafe MiMalloc::free_small_local{,_nonnull} and matching raw FFI. The
    allocation's small page must still be owned by the calling thread.

  • Aligned heap zero-allocation and reallocation, additional thread-local FFI,
    capacity hints, option diagnostics, and default/clamped option access.

  • Integration tests for profiler callback ABI, sampled pprof output, effective
    malloc override and THP defaults; benchmark comparisons against System and
    the generic/local small-free paths.

Fixed

  • Require reporter-visible TLS registration before accepting allocation events;
    count registration contention and unavailable TLS as drops. Remove the
    allocation-side flush notification protocol and its hidden pending buffers.

  • Correct allocation object counts by sharing the inclusion-probability weights
    with live heap tracking and rounding after stack aggregation. The former
    per-event integer division underestimated object counts for allocation sizes
    near the sampling interval.

  • Replace interval-crossing loops and their deterministic fallback with one
    memoryless sampling step. Keep the unsampled path to a TLS countdown and
    use a FIFO TLS ring so partial drains do not move retained stacks.

  • Inherit upstream Windows console detachment, ProcessPrng/legacy RNG loading,
    naturally aligned allocation, direct-OS-page cleanup, and inline-linkage fixes.
    Upstream #1428 adds array-reallocation contract tests.

  • Updated the Windows static-CRT compatibility source and drift tests for
    upstream moving src/theap.c to src/heap/theap.c.

  • Clarified raw constant-size free alignment and arena memory ownership
    requirements, and heap reallocation failure/alignment contracts.

  • Declare Windows __ImageBase with explicit extern in C builds. Upstream's
    C++ linkage macro expands to nothing in C and accidentally defined BSS storage,
    shadowing the linker-owned PE base. Static UCRT used that false base for RVA
    lookups and crashed in __acrt_tls2_supported before main. Verify the symbol
    matches the OS module handle and the PE header in the isolated startup test.

  • Inherit upstream #1420: invalidate cached thread heaps on heap destruction
    and collect pending cross-thread frees before resetting a destroyed page.

  • Inherit upstream #1416: make the already-declared mi_malloc_size and
    mi_malloc_usable_size available even without malloc override; test their
    actual linkage and values.

  • Inherit upstream #1419: use C11 atomics for clang C builds targeting MSVC,
    fixing ARM64EC ordering and avoiding unnecessary ARM64 barriers.

  • Inherit upstream fixes for mi_free_size size-mismatch checks, Windows
    forced-exit handling and UWP compilation, Android syscall avoidance, and
    profiling-disabled builds. Keep the built-in pprof implementation enabled in
    no_profile so explicit raw snapshots remain functional.

  • Defer full Windows static CRT initialization and strong RNG reseeding from
    the pre-CRT TLS callback to .CRT$XCT, after UCRT initialization. Keep
    weak seeds for early allocation bootstrap and TLS thread-exit cleanup.

  • Use one resolved CRT setting for MSVC compiler flags and startup compatibility;
    distinguish +crt-static from -crt-static and honor encoded Rust flags.

  • Check static CRT startup ordering before main in an isolated regression
    executable, including secure/debug/no-profile and release CI coverage.

  • Enable MI_MALLOC_OVERRIDE on non-Windows override builds.

  • Set MI_DEFAULT_ALLOW_THP=0 with no_thp; disabling only explicit huge-page
    advice did not disable the runtime THP policy or its larger purge granularity.

  • Track vendored C sources/headers for Cargo rebuilds and derive build metadata
    from MI_MALLOC_VERSION, preventing stale C objects after submodule updates.

  • Configure pprof backtrace and file-output facilities for supported targets.

  • Correct TLS/security documentation, remove the dead Windows TLS feature hook,
    strengthen small-free and borrowed-heap safety contracts, and reuse the text
    diagnostic buffer instead of copying valid UTF-8 output.

Known upstream limitation

  • V3.5.4 interim copies profile_disabled=true into new thread heaps without
    clearing it. Dedicated-heap and worker-thread profiling can remain inactive.
    Profiling stays experimental raw FFI; the integration test proves main-heap
    sampling in an isolated single-threaded process only.

Installation

[dependencies]
rustfs-mimalloc = "0.6.0"
rustfs-mimalloc-profiling = "0.6.0"

Full Changelog: v0.5.6...v0.6.0

v0.5.6

Choose a tag to compare

@github-actions github-actions released this 22 Sep 12:28

rustfs-mimalloc v0.5.6

mimalloc V3 (v3.5.3) bindings for Rust.

Fixed

  • Honor Cargo's crt-static target feature for MSVC builds instead of forcing
    /MD, allowing a Windows binary and the vendored mimalloc library to use the
    same static CRT (/MT) without a runtime DLL dependency.

Added

  • Added a Windows static-CRT CI job using -C target-feature=+crt-static.

Installation

[dependencies]
rustfs-mimalloc = "0.5.6"

Full Changelog: v0.5.5...v0.5.6

v0.5.5

Choose a tag to compare

@github-actions github-actions released this 22 Sep 12:00

rustfs-mimalloc v0.5.5

mimalloc V3 (v3.5.3) bindings for Rust.

Changed

  • Updated the mimalloc submodule to upstream v3.5.3 (commit d4881d3).
  • Updated the exposed build metadata version to 30503.

Fixed

  • Inherited mimalloc's fix for exclusive arena allocations that cross child
    arenas, including managed regions larger than 16 GiB.
  • Inherited fixes for over-aligned small allocation frees and local-dynamic TLS
    process initialization.

Added

  • Exposed V3.5.3's aligned constant-size free helpers as unsafe
    mi_free_csize_aligned{,_nonnull} FFI mirrors and MiMalloc methods.
  • Exposed raw mi_theap_alloc_new, mi_theap_alloc_new_n, and
    mi_theap_alloc_new_nothrow FFI. These retain their upstream C++ OOM-handler
    semantics and intentionally have no safe Rust wrapper.

Installation

[dependencies]
rustfs-mimalloc = "0.5.5"

Full Changelog: v0.5.4...v0.5.5

v0.5.4

Choose a tag to compare

@github-actions github-actions released this 16 Sep 01:47

rustfs-mimalloc v0.5.4

mimalloc V3 (v3.5.2) bindings for Rust.

Changed

  • Updated the mimalloc submodule to upstream v3.5.2 (commit 636510a).
  • Updated the exposed build metadata version to 30502.

Added

  • Exposed mimalloc V3.5.2's word-size small allocation APIs:
    mi_wmalloc_small, mi_wzalloc_small, mi_wsize_from_size,
    mi_malloc_csize, mi_zalloc_csize, mi_theap_wmalloc_small,
    mi_theap_wzalloc_small, mi_theap_malloc_csize, and
    mi_theap_zalloc_csize.
  • Added unsafe MiMalloc wrappers for constant-size and word-size small
    allocation fast paths.
  • Exposed mi_option_collect_merges_stats and
    mi_theap_stats_merge_to_heap through rustfs-mimalloc-sys.
  • Exposed mimalloc's experimental profiling hooks in rustfs-mimalloc-sys
    as raw FFI only.

Installation

[dependencies]
rustfs-mimalloc = "0.5.4"

Full Changelog: v0.5.3...v0.5.4

v0.5.3

Choose a tag to compare

@github-actions github-actions released this 04 Sep 08:00

rustfs-mimalloc v0.5.3

mimalloc V3 (v3.5.1) bindings for Rust.

Fixed

  • Avoid passing MSVC-only compiler flags to Windows GNU/LLVM targets such as
    x86_64-pc-windows-gnullvm.

Changed

  • Centralized build-script target detection around Cargo's structured
    CARGO_CFG_TARGET_* values to keep OS, ABI, architecture, and vendor checks
    distinct.

Installation

[dependencies]
rustfs-mimalloc = "0.5.3"

Full Changelog: v0.5.2...v0.5.3

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 03 Sep 03:33

rustfs-mimalloc v0.5.2

mimalloc V3 (v3.5.0) bindings for Rust.

Changes

Initial release.

Installation

[dependencies]
rustfs-mimalloc = "0.5.2"

Full Changelog: v0.5.1...v0.5.2

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 26 Aug 04:32

rustfs-mimalloc v0.5.1

mimalloc V3 (v3.5.0) bindings for Rust.

Changes

Initial release.

Installation

[dependencies]
rustfs-mimalloc = "0.5.1"

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 22 Aug 16:25

rustfs-mimalloc v0.5.0

mimalloc V3 (v3.5.0) bindings for Rust.

Changes

Initial release.

Installation

[dependencies]
rustfs-mimalloc = "0.5.0"

Full Changelog: v0.3.0...v0.5.0