mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Revert changeset 6661a8154eb3: Issue #3329: Add new APIs to customize memory allocators
The new API require more discussion.
This commit is contained in:
parent
05a647deed
commit
36f01ad9ac
6 changed files with 211 additions and 771 deletions
|
@ -1859,6 +1859,26 @@ PyTypeObject *_PyCapsule_hack = &PyCapsule_Type;
|
|||
Py_ssize_t (*_Py_abstract_hack)(PyObject *) = PyObject_Size;
|
||||
|
||||
|
||||
/* Python's malloc wrappers (see pymem.h) */
|
||||
|
||||
void *
|
||||
PyMem_Malloc(size_t nbytes)
|
||||
{
|
||||
return PyMem_MALLOC(nbytes);
|
||||
}
|
||||
|
||||
void *
|
||||
PyMem_Realloc(void *p, size_t nbytes)
|
||||
{
|
||||
return PyMem_REALLOC(p, nbytes);
|
||||
}
|
||||
|
||||
void
|
||||
PyMem_Free(void *p)
|
||||
{
|
||||
PyMem_FREE(p);
|
||||
}
|
||||
|
||||
void
|
||||
_PyObject_DebugTypeStats(FILE *out)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue