GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — use mimalloc as raw memory allocator in free-threading · Issue #144914 · python/cpython

use mimalloc as raw memory allocator in free-threading #144914

New issue
Copy link
New issue
Copy link
Closed
Closed
use mimalloc as raw memory allocator in free-threading#144914
Copy link
Labels
3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetopic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement

Description

@kumaraditya303
kumaraditya303
opened on Feb 17, 2026
Issue body actions

This came up in context of numpy/numpy#30494.

Currently the raw allocator (PyMem_RawMalloc and friends) uses the system allocator because it should be possible to call these APIs without an active thread state. pymalloc requires an active thread state hence that cannot be used, however on free-threading we can instead use mimalloc instead of directly calling the system allocator.

Using mimalloc instead of system allocator I see much less contention while freeing the memory on macos, see the benchmark on the numpy issue on how to reproduce the issue.

Linked PRs

  • gh-144914: use mimalloc for raw allocations on free-threading #144916
Reacted by Donghee Na and Sergey Miryanov
Reacted by stonebig

Activity

  1. kumaraditya303
    added
    topic-free-threading
    performancePerformance or resource usagePerformance or resource usage
    3.15bugs and security fixesbugs and security fixes
    on Feb 17, 2026
  2. StanFromIreland
    added
    type-featureA feature request or enhancementA feature request or enhancement
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Feb 17, 2026
  3. kumaraditya303
    added a commit that references this issue on Feb 18, 2026

    gh-144914: use `mimalloc` for raw allocations on free-threading (#144916

    836f2c9
  4. kumaraditya303
    closed this as completedon Feb 18, 2026
  5. brijkapadia
    added a commit that references this issue on Feb 28, 2026

    pythongh-144914: use `mimalloc` for raw allocations on free-threading (…

    839d770
  6. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythongh-144914: use `mimalloc` for raw allocations on free-threading (…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetopic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.