summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2021-03-30 02:51:15 (GMT)
committerGitHub <noreply@github.com>2021-03-30 02:51:15 (GMT)
commit85b6b70589c187639aeebc560d67e9cc04abb4d8 (patch)
treed8142d0876fd549e4b25743f869676d7dfe95be7 /Misc
parenta54fc683f237d8f0b6e999a63aa9b8c0a45b7fef (diff)
downloadcpython-85b6b70589c187639aeebc560d67e9cc04abb4d8.zip
cpython-85b6b70589c187639aeebc560d67e9cc04abb4d8.tar.gz
cpython-85b6b70589c187639aeebc560d67e9cc04abb4d8.tar.bz2
bpo-37448: Use radix tree for pymalloc address_in_range(). (GH-14474)
The radix tree approach is a relatively simple and memory sanitary alternative to the old (slightly) unsanitary address_in_range(). To disable the radix tree map, set a preprocessor flag as follows: -DWITH_PYMALLOC_RADIX_TREE=0. Co-authored-by: Tim Peters <tim.peters@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2021-02-21-14-19-35.bpo-37448.btl7vO.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-02-21-14-19-35.bpo-37448.btl7vO.rst b/Misc/NEWS.d/next/Core and Builtins/2021-02-21-14-19-35.bpo-37448.btl7vO.rst
new file mode 100644
index 0000000..fe771a5
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2021-02-21-14-19-35.bpo-37448.btl7vO.rst
@@ -0,0 +1,15 @@
+Add a radix tree based memory map to track in-use obmalloc arenas. Use to
+replace the old implementation of address_in_range(). The radix tree
+approach makes it easy to increase pool sizes beyond the OS page size.
+Boosting the pool and arena size allows obmalloc to handle a significantly
+higher percentage of requests from its ultra-fast paths.
+
+It also has the advantage of eliminating the memory unsanitary behavior of
+the previous address_in_range(). The old address_in_range() was marked with
+the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and
+_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed.
+
+To disable the radix tree map, set a preprocessor flag as follows:
+`-DWITH_PYMALLOC_RADIX_TREE=0`.
+
+Co-authored-by: Tim Peters <tim.peters@gmail.com>