mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-113055: Use pointer for interp->obmalloc state (gh-113412)
For interpreters that share state with the main interpreter, this points to the same static memory structure. For interpreters with their own obmalloc state, it is heap allocated. Add free_obmalloc_arenas() which will free the obmalloc arenas and radix tree structures for interpreters with their own obmalloc state. Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
parent
2d08af34b8
commit
7a7bce5a0a
9 changed files with 157 additions and 24 deletions
|
@ -686,6 +686,8 @@ extern Py_ssize_t _Py_GetGlobalAllocatedBlocks(void);
|
|||
_Py_GetGlobalAllocatedBlocks()
|
||||
extern Py_ssize_t _PyInterpreterState_GetAllocatedBlocks(PyInterpreterState *);
|
||||
extern void _PyInterpreterState_FinalizeAllocatedBlocks(PyInterpreterState *);
|
||||
extern int _PyMem_init_obmalloc(PyInterpreterState *interp);
|
||||
extern bool _PyMem_obmalloc_state_on_heap(PyInterpreterState *interp);
|
||||
|
||||
|
||||
#ifdef WITH_PYMALLOC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue