Files
metabuilder/typthon/Python/gc_gil.c
johndoe6345789 0e707caa56 feat: Add Typthon
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:10:58 +00:00

18 lines
488 B
C

#include "Python.h"
#include "pycore_freelist.h" // _TyObject_ClearFreeLists()
#ifndef Ty_GIL_DISABLED
/* Clear all free lists
* All free lists are cleared during the collection of the highest generation.
* Allocated items in the free list may keep a pymalloc arena occupied.
* Clearing the free lists may give back memory to the OS earlier.
*/
void
_TyGC_ClearAllFreeLists(TyInterpreterState *interp)
{
_TyObject_ClearFreeLists(&interp->object_state.freelists, 0);
}
#endif