classification
Title: cleanup of freelist management
Type: behavior Stage:
Components: Documentation, Interpreter Core, Tests Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: aimacintyre, christian.heimes, gregory.p.smith, pitrou
Priority: high Keywords: patch

Created on 2008-05-15 13:45 by aimacintyre, last changed 2008-07-06 03:36 by gregory.p.smith. This issue is now closed.

Files
File name Uploaded Description Edit
freelist_mgt_cleanup.patch aimacintyre, 2008-05-15 13:45 patch harmonising int/float freelist mgt with other type freelist mgt
Messages (4)
msg66858 - (view) Author: Andrew I MacIntyre (aimacintyre) * Date: 2008-05-15 13:44
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.
msg67809 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-06-07 15:28
I agree with this patch and will commit it later this weekend if I hear
no objections.  see the mailing list discussion.
msg69019 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-06-30 21:21
> I agree with this patch and will commit it later this weekend if I hear
> no objections.

Gregory, it seems there has been no objection on the ML :-)
msg69314 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-06 03:36
committed to 2.6 trunk in r64753.
History
Date User Action Args
2008-07-06 03:36:25gregory.p.smithsetstatus: open -> closed
keywords: patch, patch
messages: + msg69314
resolution: accepted
2008-06-30 21:21:32pitrousetnosy: + pitrou
messages: + msg69019
2008-06-07 15:28:56gregory.p.smithsetkeywords: patch, patch
assignee: christian.heimes -> gregory.p.smith
messages: + msg67809
2008-06-07 15:19:05gregory.p.smithsetkeywords: patch, patch
nosy: + gregory.p.smith
2008-05-15 13:45:19aimacintyrecreate