diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-03-22 15:33:15 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-03-22 15:33:15 (GMT) |
commit | dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80 (patch) | |
tree | 124d72d29df550ba35d3a4b6ba66232619c85ee1 /Modules/gcmodule.c | |
parent | a1a9c51a3ef06614413f45d51e65588bcd0793f2 (diff) | |
download | cpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.zip cpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.tar.gz cpython-dcc819a5c9e3cb60eba05a3c0b2547bc1fb28b80.tar.bz2 |
Use pymalloc if it's enabled.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index d883b91..23a137e 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -829,7 +829,7 @@ _PyObject_GC_Malloc(PyTypeObject *tp, int nitems) const size_t basicsize = _PyObject_VAR_SIZE(tp, nitems); #ifdef WITH_CYCLE_GC const size_t nbytes = sizeof(PyGC_Head) + basicsize; - PyGC_Head *g = PyObject_MALLOC(nbytes); + PyGC_Head *g = _PyMalloc_MALLOC(nbytes); if (g == NULL) return (PyObject *)PyErr_NoMemory(); g->gc.gc_next = NULL; @@ -845,7 +845,7 @@ _PyObject_GC_Malloc(PyTypeObject *tp, int nitems) } op = FROM_GC(g); #else - op = PyObject_MALLOC(basicsize); + op = _PyMalloc_MALLOC(basicsize); if (op == NULL) return (PyObject *)PyErr_NoMemory(); @@ -896,9 +896,9 @@ _PyObject_GC_Del(PyObject *op) if (allocated > 0) { allocated--; } - PyObject_FREE(g); + _PyMalloc_FREE(g); #else - PyObject_FREE(op); + _PyMalloc_FREE(op); #endif } |