Skip to content

Upgrade mimalloc version from 2.1.2 to 2.5.2 #159111

Open

Description

@corona10

Feature or enhancement

Upgrading to mimalloc to 3.x.x would need huge architecture changes, maybe we need to write a PEP for this.
But upgrading to latest 2.5.2 version would get following benefits.

  1. Some CPython downstream changes are already applied to upstream.
  2. Handling abandoned segments have been improved.
  3. Several memory leakage issues are fixed.
  4. Security fixes are applied.

I 've applied changes in my local but we need to veify this on free-threading performance benchmark from Meta.

cc @mpage @itamaro @colesbury

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. self-assigned this
    on Oct 10, 2026
  2. corona10 commented on Oct 10, 2026

    @corona10
    MemberAuthor

    IMO, we don't need to backport this change to previous version since we did not chage anything about mimalloc for a while.

  3. StanFromIreland commented on Oct 11, 2026

    @StanFromIreland
    Member

    See also #113141.

  4. daanx commented on Oct 17, 2026

    @daanx

    (I am the mimalloc maintainer): Ah, apologies, I wasn't aware of this effort @corona10 :-( -- I just added a comment in #113141 about recent efforts to update to mimalloc v3 for the next CPython release -- hope that doesn't interfere with the current efforts too much. I think is better though than upgrading the v2 version, as v3 has many improvements. Hope we can work on this.

  5. corona10 commented on Oct 17, 2026

    @corona10
    MemberAuthor

    (I am the mimalloc maintainer): Ah, apologies, I wasn't aware of this effort @corona10 :-( -- I just added a #113141 (comment) about recent efforts to update to mimalloc v3 for the next CPython release

    Yeah please send a draft PR as I replied. There are a lot of things to be verified. I am fine to move on v3 directly as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions