Skip to content

Commit

Permalink
Combine Py_GIL_DISABLED and WITH_MIMALLOC check
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Dec 8, 2023
1 parent eaf3020 commit 6f23399
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Include/internal/pycore_pymem_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ extern void * _PyMem_RawRealloc(void *, void *, size_t);
extern void _PyMem_RawFree(void *, void *);
#define PYRAW_ALLOC {NULL, _PyMem_RawMalloc, _PyMem_RawCalloc, _PyMem_RawRealloc, _PyMem_RawFree}

#if defined(Py_GIL_DISABLED) && defined(WITH_MIMALLOC)
#ifdef Py_GIL_DISABLED
// Py_GIL_DISABLED requires mimalloc
extern void* _PyObject_MiMalloc(void *, size_t);
extern void* _PyObject_MiCalloc(void *, size_t, size_t);
extern void _PyObject_MiFree(void *, void *);
Expand Down

0 comments on commit 6f23399

Please sign in to comment.