[issue1953] Compact int and float freelists

Neal Norwitz report at bugs.python.org
Mon Feb 4 07:31:37 CET 2008


Neal Norwitz added the comment:

I think sys is appropriate for clearing the cache.  Lib/test/regrtest.py
still has a reference to gc rather than sys.

Why do the CompactFreeList APIs return an int that is always 0?  Seems
like they should return a real value or be void.

I'm not sure why you changed the functions to keep a block_list_length.
 I doubt this API would be requested very often.  Seems like it would be
better to just calculate when necessary (or perhaps not even add the APIs).

The only issue I have with the patch is the casting in the printf calls.
 These can lose information.  On Win64, long is 32-bits, but size_t is
64-bits.  See PY_FORMAT_SIZE_T in Include/pyport.h for how to handle this.

----------
assignee: nnorwitz -> tiran
resolution:  -> accepted

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1953>
__________________________________


More information about the Python-bugs-list mailing list