@@ -561,14 +561,13 @@ _PyMem_GetCurrentAllocatorName(void)
561
561
}
562
562
563
563
564
- #if defined( WITH_PYMALLOC ) || defined( WITH_MIMALLOC )
564
+ #ifdef WITH_PYMALLOC
565
565
static int
566
566
_PyMem_DebugEnabled (void )
567
567
{
568
568
return (_PyObject .malloc == _PyMem_DebugMalloc );
569
569
}
570
570
571
- #ifdef WITH_PYMALLOC
572
571
static int
573
572
_PyMem_PymallocEnabled (void )
574
573
{
@@ -579,7 +578,7 @@ _PyMem_PymallocEnabled(void)
579
578
return (_PyObject .malloc == _PyObject_Malloc );
580
579
}
581
580
}
582
- #endif
581
+
583
582
#ifdef WITH_MIMALLOC
584
583
static int
585
584
_PyMem_MimallocEnabled (void )
@@ -591,8 +590,8 @@ _PyMem_MimallocEnabled(void)
591
590
return (_PyObject .malloc == _PyObject_MiMalloc );
592
591
}
593
592
}
594
- #endif
595
- #endif // defined( WITH_PYMALLOC) || defined(WITH_MIMALLOC)
593
+ #endif // WITH_MIMALLOC
594
+ #endif // WITH_PYMALLOC
596
595
597
596
598
597
static void
@@ -1028,7 +1027,6 @@ static bool count_blocks(
1028
1027
Py_ssize_t
1029
1028
_PyInterpreterState_GetAllocatedBlocks (PyInterpreterState * interp )
1030
1029
{
1031
- #ifdef WITH_MIMALLOC
1032
1030
// TODO(sgross): this only counts the current thread's blocks.
1033
1031
if (_PyMem_MimallocEnabled ()) {
1034
1032
size_t allocated_blocks = 0 ;
@@ -1038,7 +1036,6 @@ _PyInterpreterState_GetAllocatedBlocks(PyInterpreterState *interp)
1038
1036
1039
1037
return allocated_blocks ;
1040
1038
}
1041
- #endif
1042
1039
1043
1040
#ifdef Py_DEBUG
1044
1041
assert (has_own_state (interp ));
@@ -1073,7 +1070,7 @@ _PyInterpreterState_GetAllocatedBlocks(PyInterpreterState *interp)
1073
1070
void
1074
1071
_PyInterpreterState_FinalizeAllocatedBlocks (PyInterpreterState * interp )
1075
1072
{
1076
- #ifdef WITH_MIAMLLOC
1073
+ #ifdef WITH_MIMALLOC
1077
1074
if (_PyMem_MimallocEnabled ()) {
1078
1075
return ;
1079
1076
}
0 commit comments