mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
* Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: https://github.com/python/cpython/pull/31164/ Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org> |
||
|---|---|---|
| .. | ||
| clinic | ||
| abstract.c | ||
| buffer.c | ||
| code.c | ||
| datetime.c | ||
| dict.c | ||
| docstring.c | ||
| exceptions.c | ||
| float.c | ||
| gc.c | ||
| getargs.c | ||
| heaptype.c | ||
| heaptype_relative.c | ||
| immortal.c | ||
| long.c | ||
| mem.c | ||
| parts.h | ||
| pyatomic.c | ||
| pyos.c | ||
| README.txt | ||
| set.c | ||
| structmember.c | ||
| sys.c | ||
| testcapi_long.h | ||
| unicode.c | ||
| util.h | ||
| vectorcall.c | ||
| vectorcall_limited.c | ||
| watchers.c | ||
Tests in this directory are compiled into the _testcapi extension. The main file for the extension is Modules/_testcapimodule.c, which calls `_PyTestCapi_Init_*` from these functions. General guideline when writing test code for C API. * Use Argument Clinic to minimise the amount of boilerplate code. * Add a newline between the argument spec and the docstring. * If a test description is needed, make sure the added docstring clearly and succinctly describes purpose of the function. * DRY, use the clone feature of Argument Clinic. * Try to avoid adding new interned strings; reuse existing parameter names if possible. Use the `as` feature of Argument Clinic to override the C variable name, if needed.