gh-125196: Add a free list to PyUnicodeWriter (#125227) · python/cpython@1639d93 · GitHub
Skip to content

Commit 1639d93

Browse files
authored
gh-125196: Add a free list to PyUnicodeWriter (#125227)
1 parent 7a10cde commit 1639d93

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

Include/internal/pycore_freelist_state.h

Lines changed: 2 additions & 0 deletions

Objects/object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ _PyObject_ClearFreeLists(struct _Py_freelists *freelists, int is_finalization)
862862
// stacks during GC, so emptying the free-list is counterproductive.
863863
clear_freelist(&freelists->object_stack_chunks, 1, PyMem_RawFree);
864864
}
865+
clear_freelist(&freelists->unicode_writers, is_finalization, PyMem_Free);
865866
}
866867

867868
/*

Objects/unicodeobject.c

Lines changed: 9 additions & 4 deletions

0 commit comments

Comments
 (0)