summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-07-06 03:35:58 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-07-06 03:35:58 (GMT)
commit2fe77060eb2b322da925b50ffe3c471258736cee (patch)
tree0966f7b98ec52c58f6c58cf42ec75237c72dda0b /Python
parent17f2e4acb963268fe8b3c4e822f33d9372460607 (diff)
downloadcpython-2fe77060eb2b322da925b50ffe3c471258736cee.zip
cpython-2fe77060eb2b322da925b50ffe3c471258736cee.tar.gz
cpython-2fe77060eb2b322da925b50ffe3c471258736cee.tar.bz2
- Issue #2862: Make int and float freelist management consistent with other
freelists. Changes their CompactFreeList apis into ClearFreeList apis and calls them via gc.collect().
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 64ea89f..5cfb488 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -829,32 +829,12 @@ PyDoc_STRVAR(sys_clear_type_cache__doc__,
Clear the internal type lookup cache.");
-static PyObject *
-sys_compact_freelists(PyObject* self, PyObject* args)
-{
- size_t isum, ibc, ibf;
- size_t fsum, fbc, fbf;
-
- PyInt_CompactFreeList(&ibc, &ibf, &isum);
- PyFloat_CompactFreeList(&fbc, &fbf, &fsum);
-
- return Py_BuildValue("(kkk)(kkk)", isum, ibc, ibf,
- fsum, fbc, fbf);
-
-}
-
-PyDoc_STRVAR(sys_compact_freelists__doc__,
-"_compact_freelists() -> ((remaing_objects, total_blocks, freed_blocks), ...)\n\
-Compact the free lists of ints and floats.");
-
static PyMethodDef sys_methods[] = {
/* Might as well keep this in alphabetic order */
{"callstats", (PyCFunction)PyEval_GetCallStats, METH_NOARGS,
callstats_doc},
{"_clear_type_cache", sys_clear_type_cache, METH_NOARGS,
sys_clear_type_cache__doc__},
- {"_compact_freelists", sys_compact_freelists, METH_NOARGS,
- sys_compact_freelists__doc__},
{"_current_frames", sys_current_frames, METH_NOARGS,
current_frames_doc},
{"displayhook", sys_displayhook, METH_O, displayhook_doc},