Skip to content

Commit 1771d74

Browse files
committed
Remove _PyMem_SetDefaultAllocator
1 parent 64bf28c commit 1771d74

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

Include/internal/pycore_pymem.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ struct _Py_mem_interp_free_queue {
5555
struct llist_node head; // queue of _mem_work_chunk items
5656
};
5757

58-
/* Set the memory allocator of the specified domain to the default.
59-
Save the old allocator into *old_alloc if it's non-NULL.
60-
Return on success, or return -1 if the domain is unknown. */
61-
extern int _PyMem_SetDefaultAllocator(
62-
PyMemAllocatorDomain domain,
63-
PyMemAllocatorEx *old_alloc);
64-
6558
/* Special bytes broadcast into debug memory blocks at appropriate times.
6659
Strings of these are unlikely to be valid addresses, floats, ints or
6760
7-bit ASCII.

Objects/obmalloc.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -554,17 +554,6 @@ static const int pydebug = 1;
554554
static const int pydebug = 0;
555555
#endif
556556

557-
int
558-
_PyMem_SetDefaultAllocator(PyMemAllocatorDomain domain,
559-
PyMemAllocatorEx *old_alloc)
560-
{
561-
PyMutex_Lock(&ALLOCATORS_MUTEX);
562-
int res = set_default_allocator_unlocked(domain, pydebug, old_alloc);
563-
PyMutex_Unlock(&ALLOCATORS_MUTEX);
564-
return res;
565-
}
566-
567-
568557
int
569558
_PyMem_GetAllocatorName(const char *name, PyMemAllocatorName *allocator)
570559
{

0 commit comments

Comments
 (0)