@@ -10,42 +10,9 @@ extern "C" {
10
10
11
11
#include "pycore_allocators.h"
12
12
13
- #ifdef WITH_PYMALLOC
14
- void * _PyObject_Malloc (void * ctx , size_t size );
15
- void * _PyObject_Calloc (void * ctx , size_t nelem , size_t elsize );
16
- void _PyObject_Free (void * ctx , void * p );
17
- void * _PyObject_Realloc (void * ctx , void * ptr , size_t size );
18
- #endif
19
-
20
- #define MALLOC_ALLOC {NULL, _PyMem_RawMalloc, _PyMem_RawCalloc, _PyMem_RawRealloc, _PyMem_RawFree}
21
- #ifdef WITH_PYMALLOC
22
- # define PYMALLOC_ALLOC {NULL, _PyObject_Malloc, _PyObject_Calloc, _PyObject_Realloc, _PyObject_Free}
23
- #endif
24
-
25
- #define PYRAW_ALLOC MALLOC_ALLOC
26
- #ifdef WITH_PYMALLOC
27
- # define PYOBJ_ALLOC PYMALLOC_ALLOC
28
- #else
29
- # define PYOBJ_ALLOC MALLOC_ALLOC
30
- #endif
31
- #define PYMEM_ALLOC PYOBJ_ALLOC
32
-
33
- void * _PyMem_DebugRawMalloc (void * ctx , size_t size );
34
- void * _PyMem_DebugRawCalloc (void * ctx , size_t nelem , size_t elsize );
35
- void * _PyMem_DebugRawRealloc (void * ctx , void * ptr , size_t size );
36
- void _PyMem_DebugRawFree (void * ctx , void * ptr );
37
-
38
- void * _PyMem_DebugMalloc (void * ctx , size_t size );
39
- void * _PyMem_DebugCalloc (void * ctx , size_t nelem , size_t elsize );
40
- void * _PyMem_DebugRealloc (void * ctx , void * ptr , size_t size );
41
- void _PyMem_DebugFree (void * ctx , void * p );
42
13
43
- #define PYDBGRAW_ALLOC \
44
- {&_PyRuntime.allocators.debug.raw, _PyMem_DebugRawMalloc, _PyMem_DebugRawCalloc, _PyMem_DebugRawRealloc, _PyMem_DebugRawFree}
45
- #define PYDBGMEM_ALLOC \
46
- {&_PyRuntime.allocators.debug.mem, _PyMem_DebugMalloc, _PyMem_DebugCalloc, _PyMem_DebugRealloc, _PyMem_DebugFree}
47
- #define PYDBGOBJ_ALLOC \
48
- {&_PyRuntime.allocators.debug.obj, _PyMem_DebugMalloc, _PyMem_DebugCalloc, _PyMem_DebugRealloc, _PyMem_DebugFree}
14
+ /********************************/
15
+ /* the allocators' initializers */
49
16
50
17
#ifdef Py_DEBUG
51
18
#define _pymem_allocators_standard_INIT \
0 commit comments