mirror of
https://github.com/python/cpython
synced 2026-09-27 07:08:17 +03:00
* gh-112532: Use separate mimalloc heaps for GC objects In `--disable-gil` builds, we now use four separate heaps in anticipation of using mimalloc to find GC objects when the GIL is disabled. To support this, we also make a few changes to mimalloc: * `mi_heap_t` and `mi_tld_t` initialization is split from allocation. This allows us to have a `mi_tld_t` per-`PyThreadState`, which is important to keep interpreter isolation, since the same OS thread may run in multiple interpreters (using different PyThreadStates.) * Heap abandoning (mi_heap_collect_ex) can now be called from a different thread than the one that created the heap. This is necessary because we may clear and delete the containing PyThreadStates from a different thread during finalization and after fork(). * Use enum instead of defines and guard mimalloc includes. * The enum typedef will be convenient for future PRs that use the type. * Guarding the mimalloc includes allows us to unconditionally include pycore_mimalloc.h from other header files that rely on things like `struct _mimalloc_thread_state`. * Only define _mimalloc_thread_state in Py_GIL_DISABLED builds |
||
|---|---|---|
| .. | ||
| clinic | ||
| deepfreeze | ||
| frozen_modules | ||
| _warnings.c | ||
| adaptive.md | ||
| asdl.c | ||
| asm_trampoline.S | ||
| assemble.c | ||
| ast.c | ||
| ast_opt.c | ||
| ast_unparse.c | ||
| bltinmodule.c | ||
| bootstrap_hash.c | ||
| bytecodes.c | ||
| ceval.c | ||
| ceval_gil.c | ||
| ceval_macros.h | ||
| codecs.c | ||
| compile.c | ||
| condvar.h | ||
| context.c | ||
| critical_section.c | ||
| crossinterp.c | ||
| dtoa.c | ||
| dup2.c | ||
| dynamic_annotations.c | ||
| dynload_hpux.c | ||
| dynload_shlib.c | ||
| dynload_stub.c | ||
| dynload_win.c | ||
| emscripten_signal.c | ||
| emscripten_trampoline.c | ||
| errors.c | ||
| executor_cases.c.h | ||
| fileutils.c | ||
| flowgraph.c | ||
| formatter_unicode.c | ||
| frame.c | ||
| frozen.c | ||
| frozenmain.c | ||
| future.c | ||
| generated_cases.c.h | ||
| getargs.c | ||
| getcompiler.c | ||
| getcopyright.c | ||
| getopt.c | ||
| getplatform.c | ||
| getversion.c | ||
| hamt.c | ||
| hashtable.c | ||
| import.c | ||
| importdl.c | ||
| initconfig.c | ||
| instrumentation.c | ||
| intrinsics.c | ||
| legacy_tracing.c | ||
| lock.c | ||
| marshal.c | ||
| modsupport.c | ||
| mysnprintf.c | ||
| mystrtoul.c | ||
| opcode_targets.h | ||
| optimizer.c | ||
| optimizer_analysis.c | ||
| parking_lot.c | ||
| pathconfig.c | ||
| perf_trampoline.c | ||
| preconfig.c | ||
| pyarena.c | ||
| pyctype.c | ||
| pyfpe.c | ||
| pyhash.c | ||
| pylifecycle.c | ||
| pymath.c | ||
| pystate.c | ||
| pystrcmp.c | ||
| pystrhex.c | ||
| pystrtod.c | ||
| Python-ast.c | ||
| Python-tokenize.c | ||
| pythonrun.c | ||
| pytime.c | ||
| README | ||
| specialize.c | ||
| stdlib_module_names.h | ||
| structmember.c | ||
| suggestions.c | ||
| symtable.c | ||
| sysmodule.c | ||
| thread.c | ||
| thread_nt.h | ||
| thread_pthread.h | ||
| thread_pthread_stubs.h | ||
| traceback.c | ||
| tracemalloc.c | ||
| vm-state.md | ||
Miscellaneous source files for the main Python shared library