summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/patches/02-pyconfig-mimalloc.patch
blob: cc7c41a72372caaea126f0b1ef106babfd6ef488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
--- contrib/tools/python3/Include/pyconfig.h	(index)
+++ contrib/tools/python3/Include/pyconfig.h	(working tree)
@@ -13,3 +13,296 @@
 #ifdef address_sanitizer_enabled
 #undef WITH_PYMALLOC
 #endif
+
+#if WITH_MIMALLOC
+
+#define _mi_abandoned_await_readers _python3__mi_abandoned_await_readers
+#define _mi_abandoned_collect _python3__mi_abandoned_collect
+#define _mi_abandoned_default _python3__mi_abandoned_default
+#define _mi_abandoned_pool_visit_blocks _python3__mi_abandoned_pool_visit_blocks
+#define _mi_abandoned_reclaim_all _python3__mi_abandoned_reclaim_all
+#define _mi_arena_alloc _python3__mi_arena_alloc
+#define _mi_arena_alloc_aligned _python3__mi_arena_alloc_aligned
+#define _mi_arena_collect _python3__mi_arena_collect
+#define _mi_arena_contains _python3__mi_arena_contains
+#define _mi_arena_free _python3__mi_arena_free
+#define _mi_arena_id_none _python3__mi_arena_id_none
+#define _mi_arena_memid_is_os_allocated _python3__mi_arena_memid_is_os_allocated
+#define _mi_arena_memid_is_suitable _python3__mi_arena_memid_is_suitable
+#define _mi_arena_unsafe_destroy_all _python3__mi_arena_unsafe_destroy_all
+#define _mi_assert_fail _python3__mi_assert_fail
+#define _mi_bin _python3__mi_bin
+#define _mi_bin_size _python3__mi_bin_size
+#define _mi_bitmap_claim _python3__mi_bitmap_claim
+#define _mi_bitmap_claim_across _python3__mi_bitmap_claim_across
+#define _mi_bitmap_is_any_claimed _python3__mi_bitmap_is_any_claimed
+#define _mi_bitmap_is_any_claimed_across _python3__mi_bitmap_is_any_claimed_across
+#define _mi_bitmap_is_claimed _python3__mi_bitmap_is_claimed
+#define _mi_bitmap_is_claimed_across _python3__mi_bitmap_is_claimed_across
+#define _mi_bitmap_try_claim _python3__mi_bitmap_try_claim
+#define _mi_bitmap_try_find_claim_field _python3__mi_bitmap_try_find_claim_field
+#define _mi_bitmap_try_find_from_claim _python3__mi_bitmap_try_find_from_claim
+#define _mi_bitmap_try_find_from_claim_across _python3__mi_bitmap_try_find_from_claim_across
+#define _mi_bitmap_try_find_from_claim_pred _python3__mi_bitmap_try_find_from_claim_pred
+#define _mi_bitmap_unclaim _python3__mi_bitmap_unclaim
+#define _mi_bitmap_unclaim_across _python3__mi_bitmap_unclaim_across
+#define _mi_clock_end _python3__mi_clock_end
+#define _mi_clock_now _python3__mi_clock_now
+#define _mi_clock_start _python3__mi_clock_start
+#define _mi_commit_mask_committed_size _python3__mi_commit_mask_committed_size
+#define _mi_commit_mask_next_run _python3__mi_commit_mask_next_run
+#define _mi_current_thread_count _python3__mi_current_thread_count
+#define _mi_deferred_free _python3__mi_deferred_free
+#define _mi_error_message _python3__mi_error_message
+#define _mi_fprintf _python3__mi_fprintf
+#define _mi_fputs _python3__mi_fputs
+#define _mi_free_delayed_block _python3__mi_free_delayed_block
+#define _mi_free_generic _python3__mi_free_generic
+#define _mi_heap_area_init _python3__mi_heap_area_init
+#define _mi_heap_area_visit_blocks _python3__mi_heap_area_visit_blocks
+#define _mi_heap_collect_abandon _python3__mi_heap_collect_abandon
+#define _mi_heap_collect_retired _python3__mi_heap_collect_retired
+#define _mi_heap_default _python3__mi_heap_default
+#define _mi_heap_default_key _python3__mi_heap_default_key
+#define _mi_heap_delayed_free_all _python3__mi_heap_delayed_free_all
+#define _mi_heap_delayed_free_partial _python3__mi_heap_delayed_free_partial
+#define _mi_heap_destroy_pages _python3__mi_heap_destroy_pages
+#define _mi_heap_empty _python3__mi_heap_empty
+#define _mi_heap_init_ex _python3__mi_heap_init_ex
+#define _mi_heap_main _python3__mi_heap_main
+#define _mi_heap_main_get _python3__mi_heap_main_get
+#define _mi_heap_malloc_zero _python3__mi_heap_malloc_zero
+#define _mi_heap_malloc_zero_ex _python3__mi_heap_malloc_zero_ex
+#define _mi_heap_memid_is_suitable _python3__mi_heap_memid_is_suitable
+#define _mi_heap_random_next _python3__mi_heap_random_next
+#define _mi_heap_realloc_zero _python3__mi_heap_realloc_zero
+#define _mi_heap_set_default_direct _python3__mi_heap_set_default_direct
+#define _mi_heap_unsafe_destroy_all _python3__mi_heap_unsafe_destroy_all
+#define _mi_is_main_thread _python3__mi_is_main_thread
+#define _mi_malloc_generic _python3__mi_malloc_generic
+#define _mi_numa_node_count _python3__mi_numa_node_count
+#define _mi_options_init _python3__mi_options_init
+#define _mi_os_alloc _python3__mi_os_alloc
+#define _mi_os_alloc_aligned _python3__mi_os_alloc_aligned
+#define _mi_os_alloc_aligned_at_offset _python3__mi_os_alloc_aligned_at_offset
+#define _mi_os_alloc_huge_os_pages _python3__mi_os_alloc_huge_os_pages
+#define _mi_os_commit _python3__mi_os_commit
+#define _mi_os_decommit _python3__mi_os_decommit
+#define _mi_os_free _python3__mi_os_free
+#define _mi_os_free_ex _python3__mi_os_free_ex
+#define _mi_os_get_aligned_hint _python3__mi_os_get_aligned_hint
+#define _mi_os_good_alloc_size _python3__mi_os_good_alloc_size
+#define _mi_os_has_overcommit _python3__mi_os_has_overcommit
+#define _mi_os_has_virtual_reserve _python3__mi_os_has_virtual_reserve
+#define _mi_os_init _python3__mi_os_init
+#define _mi_os_large_page_size _python3__mi_os_large_page_size
+#define _mi_os_numa_node_count_get _python3__mi_os_numa_node_count_get
+#define _mi_os_numa_node_get _python3__mi_os_numa_node_get
+#define _mi_os_page_size _python3__mi_os_page_size
+#define _mi_os_protect _python3__mi_os_protect
+#define _mi_os_purge _python3__mi_os_purge
+#define _mi_os_purge_ex _python3__mi_os_purge_ex
+#define _mi_os_random_weak _python3__mi_os_random_weak
+#define _mi_os_reset _python3__mi_os_reset
+#define _mi_os_unprotect _python3__mi_os_unprotect
+#define _mi_os_use_large_page _python3__mi_os_use_large_page
+#define _mi_padding_shrink _python3__mi_padding_shrink
+#define _mi_page_abandon _python3__mi_page_abandon
+#define _mi_page_empty _python3__mi_page_empty
+#define _mi_page_free _python3__mi_page_free
+#define _mi_page_free_collect _python3__mi_page_free_collect
+#define _mi_page_malloc _python3__mi_page_malloc
+#define _mi_page_ptr_unalign _python3__mi_page_ptr_unalign
+#define _mi_page_queue_append _python3__mi_page_queue_append
+#define _mi_page_reclaim _python3__mi_page_reclaim
+#define _mi_page_retire _python3__mi_page_retire
+#define _mi_page_try_use_delayed_free _python3__mi_page_try_use_delayed_free
+#define _mi_page_unfull _python3__mi_page_unfull
+#define _mi_page_use_delayed_free _python3__mi_page_use_delayed_free
+#define _mi_preloading _python3__mi_preloading
+#define _mi_prim_alloc _python3__mi_prim_alloc
+#define _mi_prim_alloc_huge_os_pages _python3__mi_prim_alloc_huge_os_pages
+#define _mi_prim_clock_now _python3__mi_prim_clock_now
+#define _mi_prim_commit _python3__mi_prim_commit
+#define _mi_prim_decommit _python3__mi_prim_decommit
+#define _mi_prim_free _python3__mi_prim_free
+#define _mi_prim_getenv _python3__mi_prim_getenv
+#define _mi_prim_mem_init _python3__mi_prim_mem_init
+#define _mi_prim_numa_node _python3__mi_prim_numa_node
+#define _mi_prim_numa_node_count _python3__mi_prim_numa_node_count
+#define _mi_prim_out_stderr _python3__mi_prim_out_stderr
+#define _mi_prim_process_info _python3__mi_prim_process_info
+#define _mi_prim_protect _python3__mi_prim_protect
+#define _mi_prim_random_buf _python3__mi_prim_random_buf
+#define _mi_prim_reset _python3__mi_prim_reset
+#define _mi_prim_thread_associate_default_heap _python3__mi_prim_thread_associate_default_heap
+#define _mi_prim_thread_done_auto_done _python3__mi_prim_thread_done_auto_done
+#define _mi_prim_thread_init_auto_done _python3__mi_prim_thread_init_auto_done
+#define _mi_process_is_initialized _python3__mi_process_is_initialized
+#define _mi_random_init _python3__mi_random_init
+#define _mi_random_init_weak _python3__mi_random_init_weak
+#define _mi_random_next _python3__mi_random_next
+#define _mi_random_reinit_if_weak _python3__mi_random_reinit_if_weak
+#define _mi_random_split _python3__mi_random_split
+#define _mi_segment_huge_page_reset _python3__mi_segment_huge_page_reset
+#define _mi_segment_map_allocated_at _python3__mi_segment_map_allocated_at
+#define _mi_segment_map_freed_at _python3__mi_segment_map_freed_at
+#define _mi_segment_page_abandon _python3__mi_segment_page_abandon
+#define _mi_segment_page_alloc _python3__mi_segment_page_alloc
+#define _mi_segment_page_free _python3__mi_segment_page_free
+#define _mi_segment_page_start _python3__mi_segment_page_start
+#define _mi_segment_thread_collect _python3__mi_segment_thread_collect
+#define _mi_stat_counter_increase _python3__mi_stat_counter_increase
+#define _mi_stat_decrease _python3__mi_stat_decrease
+#define _mi_stat_increase _python3__mi_stat_increase
+#define _mi_stats_done _python3__mi_stats_done
+#define _mi_stats_main _python3__mi_stats_main
+#define _mi_strlcat _python3__mi_strlcat
+#define _mi_strlcpy _python3__mi_strlcpy
+#define _mi_strlen _python3__mi_strlen
+#define _mi_strnicmp _python3__mi_strnicmp
+#define _mi_strnlen _python3__mi_strnlen
+#define _mi_thread_data_collect _python3__mi_thread_data_collect
+#define _mi_thread_done _python3__mi_thread_done
+#define _mi_thread_id _python3__mi_thread_id
+#define _mi_tld_init _python3__mi_tld_init
+#define _mi_toupper _python3__mi_toupper
+#define _mi_trace_message _python3__mi_trace_message
+#define _mi_verbose_message _python3__mi_verbose_message
+#define _mi_warning_message _python3__mi_warning_message
+#define mi__expand _python3_mi__expand
+#define mi_aligned_alloc _python3_mi_aligned_alloc
+#define mi_aligned_offset_recalloc _python3_mi_aligned_offset_recalloc
+#define mi_aligned_recalloc _python3_mi_aligned_recalloc
+#define mi_arena_area _python3_mi_arena_area
+#define mi_calloc _python3_mi_calloc
+#define mi_calloc_aligned _python3_mi_calloc_aligned
+#define mi_calloc_aligned_at _python3_mi_calloc_aligned_at
+#define mi_cfree _python3_mi_cfree
+#define mi_check_owned _python3_mi_check_owned
+#define mi_collect _python3_mi_collect
+#define mi_debug_show_arenas _python3_mi_debug_show_arenas
+#define mi_dupenv_s _python3_mi_dupenv_s
+#define mi_expand _python3_mi_expand
+#define mi_free _python3_mi_free
+#define mi_free_aligned _python3_mi_free_aligned
+#define mi_free_size _python3_mi_free_size
+#define mi_free_size_aligned _python3_mi_free_size_aligned
+#define mi_good_size _python3_mi_good_size
+#define mi_heap_alloc_new _python3_mi_heap_alloc_new
+#define mi_heap_alloc_new_n _python3_mi_heap_alloc_new_n
+#define mi_heap_calloc _python3_mi_heap_calloc
+#define mi_heap_calloc_aligned _python3_mi_heap_calloc_aligned
+#define mi_heap_calloc_aligned_at _python3_mi_heap_calloc_aligned_at
+#define mi_heap_check_owned _python3_mi_heap_check_owned
+#define mi_heap_collect _python3_mi_heap_collect
+#define mi_heap_contains_block _python3_mi_heap_contains_block
+#define mi_heap_delete _python3_mi_heap_delete
+#define mi_heap_destroy _python3_mi_heap_destroy
+#define mi_heap_get_backing _python3_mi_heap_get_backing
+#define mi_heap_get_default _python3_mi_heap_get_default
+#define mi_heap_malloc _python3_mi_heap_malloc
+#define mi_heap_malloc_aligned _python3_mi_heap_malloc_aligned
+#define mi_heap_malloc_aligned_at _python3_mi_heap_malloc_aligned_at
+#define mi_heap_malloc_small _python3_mi_heap_malloc_small
+#define mi_heap_mallocn _python3_mi_heap_mallocn
+#define mi_heap_new _python3_mi_heap_new
+#define mi_heap_new_in_arena _python3_mi_heap_new_in_arena
+#define mi_heap_realloc _python3_mi_heap_realloc
+#define mi_heap_realloc_aligned _python3_mi_heap_realloc_aligned
+#define mi_heap_realloc_aligned_at _python3_mi_heap_realloc_aligned_at
+#define mi_heap_reallocf _python3_mi_heap_reallocf
+#define mi_heap_reallocn _python3_mi_heap_reallocn
+#define mi_heap_realpath _python3_mi_heap_realpath
+#define mi_heap_recalloc _python3_mi_heap_recalloc
+#define mi_heap_recalloc_aligned _python3_mi_heap_recalloc_aligned
+#define mi_heap_recalloc_aligned_at _python3_mi_heap_recalloc_aligned_at
+#define mi_heap_rezalloc _python3_mi_heap_rezalloc
+#define mi_heap_rezalloc_aligned _python3_mi_heap_rezalloc_aligned
+#define mi_heap_rezalloc_aligned_at _python3_mi_heap_rezalloc_aligned_at
+#define mi_heap_set_default _python3_mi_heap_set_default
+#define mi_heap_strdup _python3_mi_heap_strdup
+#define mi_heap_strndup _python3_mi_heap_strndup
+#define mi_heap_try_new _python3_mi_heap_try_new
+#define mi_heap_visit_blocks _python3_mi_heap_visit_blocks
+#define mi_heap_zalloc _python3_mi_heap_zalloc
+#define mi_heap_zalloc_aligned _python3_mi_heap_zalloc_aligned
+#define mi_heap_zalloc_aligned_at _python3_mi_heap_zalloc_aligned_at
+#define mi_is_in_heap_region _python3_mi_is_in_heap_region
+#define mi_is_redirected _python3_mi_is_redirected
+#define mi_malloc _python3_mi_malloc
+#define mi_malloc_aligned _python3_mi_malloc_aligned
+#define mi_malloc_aligned_at _python3_mi_malloc_aligned_at
+#define mi_malloc_good_size _python3_mi_malloc_good_size
+#define mi_malloc_size _python3_mi_malloc_size
+#define mi_malloc_small _python3_mi_malloc_small
+#define mi_malloc_usable_size _python3_mi_malloc_usable_size
+#define mi_mallocn _python3_mi_mallocn
+#define mi_manage_os_memory _python3_mi_manage_os_memory
+#define mi_manage_os_memory_ex _python3_mi_manage_os_memory_ex
+#define mi_mbsdup _python3_mi_mbsdup
+#define mi_memalign _python3_mi_memalign
+#define mi_new _python3_mi_new
+#define mi_new_aligned _python3_mi_new_aligned
+#define mi_new_aligned_nothrow _python3_mi_new_aligned_nothrow
+#define mi_new_n _python3_mi_new_n
+#define mi_new_nothrow _python3_mi_new_nothrow
+#define mi_new_realloc _python3_mi_new_realloc
+#define mi_new_reallocn _python3_mi_new_reallocn
+#define mi_option_disable _python3_mi_option_disable
+#define mi_option_enable _python3_mi_option_enable
+#define mi_option_get _python3_mi_option_get
+#define mi_option_get_clamp _python3_mi_option_get_clamp
+#define mi_option_get_size _python3_mi_option_get_size
+#define mi_option_is_enabled _python3_mi_option_is_enabled
+#define mi_option_set _python3_mi_option_set
+#define mi_option_set_default _python3_mi_option_set_default
+#define mi_option_set_enabled _python3_mi_option_set_enabled
+#define mi_option_set_enabled_default _python3_mi_option_set_enabled_default
+#define mi_posix_memalign _python3_mi_posix_memalign
+#define mi_process_info _python3_mi_process_info
+#define mi_process_init _python3_mi_process_init
+#define mi_pvalloc _python3_mi_pvalloc
+#define mi_realloc _python3_mi_realloc
+#define mi_realloc_aligned _python3_mi_realloc_aligned
+#define mi_realloc_aligned_at _python3_mi_realloc_aligned_at
+#define mi_reallocarr _python3_mi_reallocarr
+#define mi_reallocarray _python3_mi_reallocarray
+#define mi_reallocf _python3_mi_reallocf
+#define mi_reallocn _python3_mi_reallocn
+#define mi_realpath _python3_mi_realpath
+#define mi_recalloc _python3_mi_recalloc
+#define mi_recalloc_aligned _python3_mi_recalloc_aligned
+#define mi_recalloc_aligned_at _python3_mi_recalloc_aligned_at
+#define mi_register_deferred_free _python3_mi_register_deferred_free
+#define mi_register_error _python3_mi_register_error
+#define mi_register_output _python3_mi_register_output
+#define mi_reserve_huge_os_pages _python3_mi_reserve_huge_os_pages
+#define mi_reserve_huge_os_pages_at _python3_mi_reserve_huge_os_pages_at
+#define mi_reserve_huge_os_pages_at_ex _python3_mi_reserve_huge_os_pages_at_ex
+#define mi_reserve_huge_os_pages_interleave _python3_mi_reserve_huge_os_pages_interleave
+#define mi_reserve_os_memory _python3_mi_reserve_os_memory
+#define mi_reserve_os_memory_ex _python3_mi_reserve_os_memory_ex
+#define mi_rezalloc _python3_mi_rezalloc
+#define mi_rezalloc_aligned _python3_mi_rezalloc_aligned
+#define mi_rezalloc_aligned_at _python3_mi_rezalloc_aligned_at
+#define mi_stats_merge _python3_mi_stats_merge
+#define mi_stats_print _python3_mi_stats_print
+#define mi_stats_print_out _python3_mi_stats_print_out
+#define mi_stats_reset _python3_mi_stats_reset
+#define mi_strdup _python3_mi_strdup
+#define mi_strndup _python3_mi_strndup
+#define mi_thread_done _python3_mi_thread_done
+#define mi_thread_init _python3_mi_thread_init
+#define mi_thread_stats_print_out _python3_mi_thread_stats_print_out
+#define mi_usable_size _python3_mi_usable_size
+#define mi_valloc _python3_mi_valloc
+#define mi_version _python3_mi_version
+#define mi_wcsdup _python3_mi_wcsdup
+#define mi_wdupenv_s _python3_mi_wdupenv_s
+#define mi_zalloc _python3_mi_zalloc
+#define mi_zalloc_aligned _python3_mi_zalloc_aligned
+#define mi_zalloc_aligned_at _python3_mi_zalloc_aligned_at
+#define mi_zalloc_small _python3_mi_zalloc_small
+
+#endif