summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-10-21 13:12:20 (GMT)
committerGitHub <noreply@github.com>2021-10-21 13:12:20 (GMT)
commit9942f42a93ccda047fd3558c47b822e99afe10c0 (patch)
tree5a28ecf799a90b9225530c12acd7c38c1935f156 /PC
parent5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c (diff)
downloadcpython-9942f42a93ccda047fd3558c47b822e99afe10c0.zip
cpython-9942f42a93ccda047fd3558c47b822e99afe10c0.tar.gz
cpython-9942f42a93ccda047fd3558c47b822e99afe10c0.tar.bz2
bpo-45522: Allow to disable freelists on build time (GH-29056)
Freelists for object structs can now be disabled. A new ``configure`` option ``--without-freelists`` can be used to disable all freelists except empty tuple singleton. Internal Py*_MAXFREELIST macros can now be defined as 0 without causing compiler warnings and segfaults. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'PC')
-rw-r--r--PC/pyconfig.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index bb55ff4..b3e73d4 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -463,6 +463,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Use Python's own small-block memory-allocator. */
#define WITH_PYMALLOC 1
+/* Define if you want to compile in object freelists optimization */
+#define WITH_FREELISTS 1
+
/* Define if you have clock. */
/* #define HAVE_CLOCK */