This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aimacintyre
Recipients aimacintyre, christian.heimes
Date 2008-05-15.13:44:59
SpamBayes Score 0.00018350621
Marked as misclassified No
Message-id <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za>
In-reply-to
Content
In r60567, support for compacting the int & float freelists was added
with a function in the sys module to call the compaction routines.

Since then, other freelist clearing routines have been added to other
types and are called from the collect() function in the gc module.

The attached patch harmonises the in/float freelist compaction with the
other freelist clearing mechanisms.  It does away with the function in
the sys module in favour of running the freelist clearing from gc.collect().

The signatures of the type specific freelist clearing routines have been
brought into line with the other type freelist clearing routines, with
the exception that they return the number of items _not_ free()ed,
rather than the number of items free()ed.  I took this approach to try
and highlight the fact the current int/float freelist implementations
don't use pymalloc and not all items will always be free()ed when the
routine is called.  This return is ignored when called from gc.collect()
in any case.

The patch includes doc updates and test updates to reflect the changes.
 It has been tested on FreeBSD 6.3, surviving a default test run with no
unusual test failures as far as I can tell.  It is not otherwise
rigorously tested.

The patch is against a trunk checkout that seems to be at r63156.

Ideally this patch, or similar modifications, should be applied before
the feature freeze for 2.6, so that freelist management is rationalised
to one way to do it.
History
Date User Action Args
2008-05-15 13:46:22aimacintyresetspambayes_score: 0.000183506 -> 0.00018350621
recipients: + aimacintyre, christian.heimes
2008-05-15 13:46:21aimacintyresetspambayes_score: 0.000183506 -> 0.000183506
messageid: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za>
2008-05-15 13:45:19aimacintyrelinkissue2862 messages
2008-05-15 13:45:18aimacintyrecreate