Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e6215a9

Browse files
committed
bpo-46657: Add mimalloc memory allocator
1 parent 7b01ce7 commit e6215a9

24 files changed

+847
-32
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ Tools/ssl/amd64
142142
Tools/ssl/win32
143143
Tools/freeze/test/outdir
144144

145+
# unused mimalloc files
146+
Include/mimalloc/mimalloc-new-delete.h
147+
Include/mimalloc/mimalloc-override.h
148+
145149
# The frozen modules are always generated by the build so we don't
146150
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
147151
Python/frozen_modules/*.h

Doc/c-api/init_config.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,28 @@ PyPreConfig
243243
* ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc
244244
memory allocator <pymalloc>` with :ref:`debug hooks
245245
<pymem-debug-hooks>`.
246+
* ``PYMEM_ALLOCATOR_MIMALLOC`` (``7``): :ref:`mimalloc
247+
memory allocator <mimalloc>`.
248+
* ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``8``): :ref:`mimalloc
249+
memory allocator <mimalloc>` with :ref:`debug hooks
250+
<pymem-debug-hooks>`.
246251
247252
``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are
248253
not supported if Python is :option:`configured using --without-pymalloc
249254
<--without-pymalloc>`.
250255
256+
``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are
257+
not supported unless Python is :option:`configured using --with-mimalloc
258+
<--with-mimalloc>`.
259+
251260
See :ref:`Memory Management <memory>`.
252261
253262
Default: ``PYMEM_ALLOCATOR_NOT_SET``.
254263
264+
.. versionchanged:: 3.11
265+
Added ``PYMEM_ALLOCATOR_MIMALLOC`` and
266+
``PYMEM_ALLOCATOR_MIMALLOC_DEBUG``.
267+
255268
.. c:member:: int configure_locale
256269
257270
Set the LC_CTYPE locale to the user preferred locale?

Doc/c-api/memory.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,12 @@ Default memory allocators:
377377
=============================== ==================== ================== ===================== ====================
378378
Configuration Name PyMem_RawMalloc PyMem_Malloc PyObject_Malloc
379379
=============================== ==================== ================== ===================== ====================
380-
Release build ``"pymalloc"`` ``malloc`` ``pymalloc`` ``pymalloc``
381-
Debug build ``"pymalloc_debug"`` ``malloc`` + debug ``pymalloc`` + debug ``pymalloc`` + debug
382-
Release build, without pymalloc ``"malloc"`` ``malloc`` ``malloc`` ``malloc``
383-
Debug build, without pymalloc ``"malloc_debug"`` ``malloc`` + debug ``malloc`` + debug ``malloc`` + debug
380+
Release build, with mimalloc ``"mimalloc"`` ``mimalloc`` ``mimalloc`` ``mimalloc``
381+
Debug build, with mimalloc ``"mimalloc_debug"`` ``malloc`` + debug ``mimalloc`` + debug ``mimalloc`` + debug
382+
Release build, without mimalloc ``"pymalloc"`` ``malloc`` ``pymalloc`` ``pymalloc``
383+
Debug build, without mimalloc ``"pymalloc_debug"`` ``malloc`` + debug ``pymalloc`` + debug ``pymalloc`` + debug
384+
Release build, without both ``"malloc"`` ``malloc`` ``malloc`` ``malloc``
385+
Debug build, without both ``"malloc_debug"`` ``malloc`` + debug ``malloc`` + debug ``malloc`` + debug
384386
=============================== ==================== ================== ===================== ====================
385387
386388
Legend:
@@ -389,6 +391,7 @@ Legend:
389391
* ``malloc``: system allocators from the standard C library, C functions:
390392
:c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`.
391393
* ``pymalloc``: :ref:`pymalloc memory allocator <pymalloc>`.
394+
* ``mimalloc``: :ref:`mimalloc memory allocator <mimalloc>`.
392395
* "+ debug": with :ref:`debug hooks on the Python memory allocators
393396
<pymem-debug-hooks>`.
394397
* "Debug build": :ref:`Python build in debug mode <debug-build>`.
@@ -643,6 +646,21 @@ Customize pymalloc Arena Allocator
643646
Set the arena allocator.
644647
645648
649+
.. _mimalloc:
650+
651+
The mimalloc allocator
652+
======================
653+
654+
`mimalloc (pronounced "me-malloc") <https://github.com/microsoft/mimalloc>`_
655+
is a general purpose allocator with excellent performance characteristics.
656+
657+
This allocator is disabled by default unless Python is configured with the
658+
:option:`--with-mimalloc` option. It can also be disabled at runtime using
659+
the :envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``).
660+
If Python is configured with both :ref:`pymalloc <pymalloc>` and mimalloc, then
661+
mimalloc is preferred.
662+
663+
646664
tracemalloc C API
647665
=================
648666

Doc/using/cmdline.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,13 +885,21 @@ conflict.
885885
* ``pymalloc``: use the :ref:`pymalloc allocator <pymalloc>` for
886886
:c:data:`PYMEM_DOMAIN_MEM` and :c:data:`PYMEM_DOMAIN_OBJ` domains and use
887887
the :c:func:`malloc` function for the :c:data:`PYMEM_DOMAIN_RAW` domain.
888+
* ``mimalloc``: use the :ref:`mimalloc allocator <mimalloc>` for
889+
all domains (in debug mode :c:data:`PYMEM_DOMAIN_RAW` uses :c:func:`malloc`
890+
function).
891+
888892

889893
Install :ref:`debug hooks <pymem-debug-hooks>`:
890894

891895
* ``debug``: install debug hooks on top of the :ref:`default memory
892896
allocators <default-memory-allocators>`.
893897
* ``malloc_debug``: same as ``malloc`` but also install debug hooks.
894898
* ``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks.
899+
* ``mimalloc_debug``: same as ``mimalloc`` but also install debug hooks.
900+
901+
.. versionchanged:: 3.11
902+
Added the ``"mimalloc"`` and ``"mimalloc_debug"`` allocators
895903

896904
.. versionchanged:: 3.7
897905
Added the ``"default"`` allocator.

Doc/using/configure.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,12 @@ also be used to improve performance.
262262

263263
See also :envvar:`PYTHONMALLOC` environment variable.
264264

265+
.. cmdoption:: --with-mimalloc
266+
267+
Enable :ref:`mimalloc <mimalloc>` memory allocator (disabled by default).
268+
269+
See also :envvar:`PYTHONMALLOC` environment variable.
270+
265271
.. cmdoption:: --without-doc-strings
266272

267273
Disable static documentation strings to reduce the memory footprint (enabled

Include/cpython/pymem.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ typedef enum {
4141
PYMEM_ALLOCATOR_PYMALLOC = 5,
4242
PYMEM_ALLOCATOR_PYMALLOC_DEBUG = 6,
4343
#endif
44+
#ifdef WITH_MIMALLOC
45+
PYMEM_ALLOCATOR_MIMALLOC = 7,
46+
PYMEM_ALLOCATOR_MIMALLOC_DEBUG = 8,
47+
#endif
4448
} PyMemAllocatorName;
4549

4650

Include/internal/pycore_mimalloc.h

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
#ifndef Py_INTERNAL_MIMALLOC_H
2+
#define Py_INTERNAL_MIMALLOC_H
3+
4+
#ifndef Py_BUILD_CORE
5+
# error "this header requires Py_BUILD_CORE define"
6+
#endif
7+
8+
#if defined(MIMALLOC_H) || defined(MIMALLOC_TYPES_H)
9+
# error "pycore_mimalloc.h must be included before mimalloc.h"
10+
#endif
11+
12+
#include "pycore_pymem.h"
13+
#define MI_DEBUG_UNINIT PYMEM_CLEANBYTE
14+
#define MI_DEBUG_FREED PYMEM_DEADBYTE
15+
#define MI_DEBUG_PADDING PYMEM_FORBIDDENBYTE
16+
17+
#ifdef Py_DEBUG
18+
// see mimalloc-types.h
19+
// basic and internal assertion checks
20+
# define MI_DEBUG 2
21+
// check for double free, buffer overflows and invalid pointer free
22+
# define MI_SECURE 4
23+
#endif
24+
25+
/* Prefix all non-static symbols with "_Py_"
26+
* nm Objects/obmalloc.o | grep -E "[CRT] _?mi" | awk '{print "#define " $3 " _Py_" $3}' | sort
27+
*/
28+
#if 1
29+
#define _mi_abandoned_await_readers _Py__mi_abandoned_await_readers
30+
#define _mi_abandoned_reclaim_all _Py__mi_abandoned_reclaim_all
31+
#define mi_aligned_alloc _Py_mi_aligned_alloc
32+
#define mi_aligned_offset_recalloc _Py_mi_aligned_offset_recalloc
33+
#define mi_aligned_recalloc _Py_mi_aligned_recalloc
34+
#define _mi_arena_alloc_aligned _Py__mi_arena_alloc_aligned
35+
#define _mi_arena_alloc _Py__mi_arena_alloc
36+
#define _mi_arena_free _Py__mi_arena_free
37+
#define _mi_bin _Py__mi_bin
38+
#define _mi_bin_size _Py__mi_bin_size
39+
#define _mi_bitmap_claim_across _Py__mi_bitmap_claim_across
40+
#define _mi_bitmap_claim _Py__mi_bitmap_claim
41+
#define _mi_bitmap_is_any_claimed_across _Py__mi_bitmap_is_any_claimed_across
42+
#define _mi_bitmap_is_any_claimed _Py__mi_bitmap_is_any_claimed
43+
#define _mi_bitmap_is_claimed_across _Py__mi_bitmap_is_claimed_across
44+
#define _mi_bitmap_is_claimed _Py__mi_bitmap_is_claimed
45+
#define _mi_bitmap_try_find_claim_field _Py__mi_bitmap_try_find_claim_field
46+
#define _mi_bitmap_try_find_from_claim_across _Py__mi_bitmap_try_find_from_claim_across
47+
#define _mi_bitmap_try_find_from_claim _Py__mi_bitmap_try_find_from_claim
48+
#define _mi_bitmap_unclaim_across _Py__mi_bitmap_unclaim_across
49+
#define _mi_bitmap_unclaim _Py__mi_bitmap_unclaim
50+
#define _mi_block_zero_init _Py__mi_block_zero_init
51+
#define mi_calloc_aligned_at _Py_mi_calloc_aligned_at
52+
#define mi_calloc_aligned _Py_mi_calloc_aligned
53+
#define mi_calloc _Py_mi_calloc
54+
#define mi_cfree _Py_mi_cfree
55+
#define mi_check_owned _Py_mi_check_owned
56+
#define _mi_clock_end _Py__mi_clock_end
57+
#define _mi_clock_now _Py__mi_clock_now
58+
#define _mi_clock_start _Py__mi_clock_start
59+
#define mi_collect _Py_mi_collect
60+
#define _mi_commit_mask_committed_size _Py__mi_commit_mask_committed_size
61+
#define _mi_commit_mask_next_run _Py__mi_commit_mask_next_run
62+
#define _mi_current_thread_count _Py__mi_current_thread_count
63+
#define mi_debug_show_arenas _Py_mi_debug_show_arenas
64+
#define _mi_deferred_free _Py__mi_deferred_free
65+
#define mi_dupenv_s _Py_mi_dupenv_s
66+
#define _mi_error_message _Py__mi_error_message
67+
#define mi__expand _Py_mi__expand
68+
#define mi_expand _Py_mi_expand
69+
#define _mi_fprintf _Py__mi_fprintf
70+
#define _mi_fputs _Py__mi_fputs
71+
#define mi_free_aligned _Py_mi_free_aligned
72+
#define _mi_free_delayed_block _Py__mi_free_delayed_block
73+
#define mi_free _Py_mi_free
74+
#define mi_free_size_aligned _Py_mi_free_size_aligned
75+
#define mi_free_size _Py_mi_free_size
76+
#define mi_good_size _Py_mi_good_size
77+
#define mi_heap_calloc_aligned_at _Py_mi_heap_calloc_aligned_at
78+
#define mi_heap_calloc_aligned _Py_mi_heap_calloc_aligned
79+
#define mi_heap_calloc _Py_mi_heap_calloc
80+
#define mi_heap_check_owned _Py_mi_heap_check_owned
81+
#define _mi_heap_collect_abandon _Py__mi_heap_collect_abandon
82+
#define mi_heap_collect _Py_mi_heap_collect
83+
#define _mi_heap_collect_retired _Py__mi_heap_collect_retired
84+
#define mi_heap_contains_block _Py_mi_heap_contains_block
85+
#define _mi_heap_delayed_free _Py__mi_heap_delayed_free
86+
#define mi_heap_delete _Py_mi_heap_delete
87+
#define _mi_heap_destroy_pages _Py__mi_heap_destroy_pages
88+
#define mi_heap_destroy _Py_mi_heap_destroy
89+
#define _mi_heap_empty _Py__mi_heap_empty
90+
#define mi_heap_get_backing _Py_mi_heap_get_backing
91+
#define mi_heap_get_default _Py_mi_heap_get_default
92+
#define _mi_heap_main_get _Py__mi_heap_main_get
93+
#define mi_heap_malloc_aligned_at _Py_mi_heap_malloc_aligned_at
94+
#define mi_heap_malloc_aligned _Py_mi_heap_malloc_aligned
95+
#define mi_heap_mallocn _Py_mi_heap_mallocn
96+
#define mi_heap_malloc _Py_mi_heap_malloc
97+
#define mi_heap_malloc_small _Py_mi_heap_malloc_small
98+
#define _mi_heap_malloc_zero _Py__mi_heap_malloc_zero
99+
#define mi_heap_new _Py_mi_heap_new
100+
#define _mi_heap_random_next _Py__mi_heap_random_next
101+
#define mi_heap_realloc_aligned_at _Py_mi_heap_realloc_aligned_at
102+
#define mi_heap_realloc_aligned _Py_mi_heap_realloc_aligned
103+
#define mi_heap_reallocf _Py_mi_heap_reallocf
104+
#define mi_heap_reallocn _Py_mi_heap_reallocn
105+
#define mi_heap_realloc _Py_mi_heap_realloc
106+
#define _mi_heap_realloc_zero _Py__mi_heap_realloc_zero
107+
#define mi_heap_realpath _Py_mi_heap_realpath
108+
#define mi_heap_recalloc_aligned_at _Py_mi_heap_recalloc_aligned_at
109+
#define mi_heap_recalloc_aligned _Py_mi_heap_recalloc_aligned
110+
#define mi_heap_recalloc _Py_mi_heap_recalloc
111+
#define mi_heap_rezalloc_aligned_at _Py_mi_heap_rezalloc_aligned_at
112+
#define mi_heap_rezalloc_aligned _Py_mi_heap_rezalloc_aligned
113+
#define mi_heap_rezalloc _Py_mi_heap_rezalloc
114+
#define _mi_heap_set_default_direct _Py__mi_heap_set_default_direct
115+
#define mi_heap_set_default _Py_mi_heap_set_default
116+
#define mi_heap_strdup _Py_mi_heap_strdup
117+
#define mi_heap_strndup _Py_mi_heap_strndup
118+
#define mi_heap_visit_blocks _Py_mi_heap_visit_blocks
119+
#define mi_heap_zalloc_aligned_at _Py_mi_heap_zalloc_aligned_at
120+
#define mi_heap_zalloc_aligned _Py_mi_heap_zalloc_aligned
121+
#define mi_heap_zalloc _Py_mi_heap_zalloc
122+
#define mi_is_in_heap_region _Py_mi_is_in_heap_region
123+
#define _mi_is_main_thread _Py__mi_is_main_thread
124+
#define mi_is_redirected _Py_mi_is_redirected
125+
#define mi_malloc_aligned_at _Py_mi_malloc_aligned_at
126+
#define mi_malloc_aligned _Py_mi_malloc_aligned
127+
#define _mi_malloc_generic _Py__mi_malloc_generic
128+
#define mi_malloc_good_size _Py_mi_malloc_good_size
129+
#define mi_mallocn _Py_mi_mallocn
130+
#define mi_malloc _Py_mi_malloc
131+
#define mi_malloc_size _Py_mi_malloc_size
132+
#define mi_malloc_small _Py_mi_malloc_small
133+
#define mi_malloc_usable_size _Py_mi_malloc_usable_size
134+
#define mi_manage_os_memory _Py_mi_manage_os_memory
135+
#define mi_mbsdup _Py_mi_mbsdup
136+
#define mi_memalign _Py_mi_memalign
137+
#define mi_new_aligned_nothrow _Py_mi_new_aligned_nothrow
138+
#define mi_new_aligned _Py_mi_new_aligned
139+
#define mi_new_nothrow _Py_mi_new_nothrow
140+
#define mi_new_n _Py_mi_new_n
141+
#define mi_new _Py_mi_new
142+
#define mi_new_reallocn _Py_mi_new_reallocn
143+
#define mi_new_realloc _Py_mi_new_realloc
144+
#define mi_option_disable _Py_mi_option_disable
145+
#define mi_option_enable _Py_mi_option_enable
146+
#define mi_option_get _Py_mi_option_get
147+
#define mi_option_is_enabled _Py_mi_option_is_enabled
148+
#define mi_option_set_default _Py_mi_option_set_default
149+
#define mi_option_set_enabled_default _Py_mi_option_set_enabled_default
150+
#define mi_option_set_enabled _Py_mi_option_set_enabled
151+
#define mi_option_set _Py_mi_option_set
152+
#define _mi_options_init _Py__mi_options_init
153+
#define _mi_os_alloc_aligned _Py__mi_os_alloc_aligned
154+
#define _mi_os_alloc_huge_os_pages _Py__mi_os_alloc_huge_os_pages
155+
#define _mi_os_alloc _Py__mi_os_alloc
156+
#define _mi_os_commit _Py__mi_os_commit
157+
#define _mi_os_decommit _Py__mi_os_decommit
158+
#define _mi_os_free_ex _Py__mi_os_free_ex
159+
#define _mi_os_free_huge_pages _Py__mi_os_free_huge_pages
160+
#define _mi_os_free _Py__mi_os_free
161+
#define _mi_os_good_alloc_size _Py__mi_os_good_alloc_size
162+
#define _mi_os_has_overcommit _Py__mi_os_has_overcommit
163+
#define _mi_os_init _Py__mi_os_init
164+
#define _mi_os_large_page_size _Py__mi_os_large_page_size
165+
#define _mi_os_numa_node_count_get _Py__mi_os_numa_node_count_get
166+
#define _mi_os_numa_node_get _Py__mi_os_numa_node_get
167+
#define _mi_os_page_size _Py__mi_os_page_size
168+
#define _mi_os_protect _Py__mi_os_protect
169+
#define _mi_os_random_weak _Py__mi_os_random_weak
170+
#define _mi_os_reset _Py__mi_os_reset
171+
#define _mi_os_shrink _Py__mi_os_shrink
172+
#define _mi_os_unprotect _Py__mi_os_unprotect
173+
#define _mi_os_unreset _Py__mi_os_unreset
174+
#define _mi_page_abandon _Py__mi_page_abandon
175+
#define _mi_page_empty _Py__mi_page_empty
176+
#define _mi_page_free_collect _Py__mi_page_free_collect
177+
#define _mi_page_free _Py__mi_page_free
178+
#define _mi_page_malloc _Py__mi_page_malloc
179+
#define _mi_page_ptr_unalign _Py__mi_page_ptr_unalign
180+
#define _mi_page_queue_append _Py__mi_page_queue_append
181+
#define _mi_page_reclaim _Py__mi_page_reclaim
182+
#define _mi_page_retire _Py__mi_page_retire
183+
#define _mi_page_unfull _Py__mi_page_unfull
184+
#define _mi_page_use_delayed_free _Py__mi_page_use_delayed_free
185+
#define mi_posix_memalign _Py_mi_posix_memalign
186+
#define _mi_preloading _Py__mi_preloading
187+
#define mi_process_info _Py_mi_process_info
188+
#define mi_process_init _Py_mi_process_init
189+
#define mi_pvalloc _Py_mi_pvalloc
190+
#define _mi_random_init _Py__mi_random_init
191+
#define _mi_random_next _Py__mi_random_next
192+
#define _mi_random_split _Py__mi_random_split
193+
#define mi_realloc_aligned_at _Py_mi_realloc_aligned_at
194+
#define mi_realloc_aligned _Py_mi_realloc_aligned
195+
#define mi_reallocarray _Py_mi_reallocarray
196+
#define mi_reallocf _Py_mi_reallocf
197+
#define mi_reallocn _Py_mi_reallocn
198+
#define mi_realloc _Py_mi_realloc
199+
#define mi_realpath _Py_mi_realpath
200+
#define mi_recalloc_aligned_at _Py_mi_recalloc_aligned_at
201+
#define mi_recalloc_aligned _Py_mi_recalloc_aligned
202+
#define mi_recalloc _Py_mi_recalloc
203+
#define mi_register_deferred_free _Py_mi_register_deferred_free
204+
#define mi_register_error _Py_mi_register_error
205+
#define mi_register_output _Py_mi_register_output
206+
#define mi_reserve_huge_os_pages_at _Py_mi_reserve_huge_os_pages_at
207+
#define mi_reserve_huge_os_pages_interleave _Py_mi_reserve_huge_os_pages_interleave
208+
#define mi_reserve_huge_os_pages _Py_mi_reserve_huge_os_pages
209+
#define mi_reserve_os_memory _Py_mi_reserve_os_memory
210+
#define mi_rezalloc_aligned_at _Py_mi_rezalloc_aligned_at
211+
#define mi_rezalloc_aligned _Py_mi_rezalloc_aligned
212+
#define mi_rezalloc _Py_mi_rezalloc
213+
#define _mi_segment_cache_pop _Py__mi_segment_cache_pop
214+
#define _mi_segment_cache_push _Py__mi_segment_cache_push
215+
#define _mi_segment_huge_page_free _Py__mi_segment_huge_page_free
216+
#define _mi_segment_map_allocated_at _Py__mi_segment_map_allocated_at
217+
#define _mi_segment_map_freed_at _Py__mi_segment_map_freed_at
218+
#define _mi_segment_page_abandon _Py__mi_segment_page_abandon
219+
#define _mi_segment_page_alloc _Py__mi_segment_page_alloc
220+
#define _mi_segment_page_free _Py__mi_segment_page_free
221+
#define _mi_segment_page_start _Py__mi_segment_page_start
222+
#define _mi_segment_thread_collect _Py__mi_segment_thread_collect
223+
#define _mi_stat_counter_increase _Py__mi_stat_counter_increase
224+
#define _mi_stat_decrease _Py__mi_stat_decrease
225+
#define _mi_stat_increase _Py__mi_stat_increase
226+
#define _mi_stats_done _Py__mi_stats_done
227+
#define mi_stats_merge _Py_mi_stats_merge
228+
#define mi_stats_print_out _Py_mi_stats_print_out
229+
#define mi_stats_print _Py_mi_stats_print
230+
#define mi_stats_reset _Py_mi_stats_reset
231+
#define mi_strdup _Py_mi_strdup
232+
#define mi_strndup _Py_mi_strndup
233+
#define mi_thread_done _Py_mi_thread_done
234+
#define mi_thread_init _Py_mi_thread_init
235+
#define mi_thread_stats_print_out _Py_mi_thread_stats_print_out
236+
#define _mi_trace_message _Py__mi_trace_message
237+
#define mi_usable_size _Py_mi_usable_size
238+
#define mi_valloc _Py_mi_valloc
239+
#define _mi_verbose_message _Py__mi_verbose_message
240+
#define mi_version _Py_mi_version
241+
#define _mi_warning_message _Py__mi_warning_message
242+
#define mi_wcsdup _Py_mi_wcsdup
243+
#define mi_wdupenv_s _Py_mi_wdupenv_s
244+
#define mi_zalloc_aligned_at _Py_mi_zalloc_aligned_at
245+
#define mi_zalloc_aligned _Py_mi_zalloc_aligned
246+
#define mi_zalloc _Py_mi_zalloc
247+
#define mi_zalloc_small _Py_mi_zalloc_small
248+
#endif
249+
250+
#define _mi_assert_fail _Py__mi_assert_fail
251+
#define _mi_numa_node_count _Py__mi_numa_node_count
252+
#define _ZSt15get_new_handlerv _Py__ZSt15get_new_handlerv
253+
254+
#include "mimalloc.h"
255+
#include "mimalloc-internal.h"
256+
257+
#endif /* !Py_INTERNAL_MIMALLOC_H */

0 commit comments

Comments
 (0)