mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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>
This commit is contained in:
parent
5a14f71fe8
commit
9942f42a93
15 changed files with 218 additions and 35 deletions
17
configure.ac
17
configure.ac
|
@ -3616,6 +3616,23 @@ then
|
|||
fi
|
||||
AC_MSG_RESULT($with_pymalloc)
|
||||
|
||||
# Check whether objects such as float, tuple and dict are using
|
||||
# freelists to optimization memory allocation.
|
||||
AC_MSG_CHECKING(for --with-freelists)
|
||||
AC_ARG_WITH(freelists,
|
||||
AS_HELP_STRING([--with-freelists], [enable object freelists (default is yes)]))
|
||||
|
||||
if test -z "$with_freelists"
|
||||
then
|
||||
with_freelists="yes"
|
||||
fi
|
||||
if test "$with_freelists" != "no"
|
||||
then
|
||||
AC_DEFINE(WITH_FREELISTS, 1,
|
||||
[Define if you want to compile in object freelists optimization])
|
||||
fi
|
||||
AC_MSG_RESULT($with_freelists)
|
||||
|
||||
# Check for --with-c-locale-coercion
|
||||
AC_MSG_CHECKING(for --with-c-locale-coercion)
|
||||
AC_ARG_WITH(c-locale-coercion,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue