From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 14 Jul 2022 19:04:06 +0000 (-0700) Subject: gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (GH-94842) X-Git-Tag: v3.11.0b5~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=498c6490807e67a48df7982d266acd2c7407ca60;p=thirdparty%2FPython%2Fcpython.git gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (GH-94842) (cherry picked from commit 9b3f7792093c533608f70043aa2a7daf7f903a16) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com> --- diff --git a/Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst b/Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst new file mode 100644 index 000000000000..f7ad4f88a51d --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst @@ -0,0 +1 @@ +Fix the possible performance regression of :c:func:`PyObject_Free` compiled with MSVC version 1932. diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 823855ca6d8e..ce5da5f1b7b9 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -1445,7 +1445,7 @@ static arena_map_bot_t arena_map_root; /* Return a pointer to a bottom tree node, return NULL if it doesn't exist or * it cannot be created */ -static arena_map_bot_t * +static Py_ALWAYS_INLINE arena_map_bot_t * arena_map_get(block *p, int create) { #ifdef USE_INTERIOR_NODES