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 pitrou
Recipients gvanrossum, matthiastroffaes, pitrou, rhettinger, skip.montanaro
Date 2009-08-15.22:50:43
SpamBayes Score 1.3729329e-10
Marked as misclassified No
Message-id <1250376829.4731.8.camel@localhost>
In-reply-to <1250373977.52.0.413904489245.issue6695@psf.upfronthosting.co.za>
Content
Le samedi 15 août 2009 à 22:06 +0000, Raymond Hettinger a écrit :
> Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:
> 
> > The reason is that users expect gc.collect() to make 
> > its best to diminish memory use.
> 
> I thought GC was expected to eliminate reference cycles.

Of course, but it's also the de facto API when wanting to reclaim
memory. The face that a single function call is sufficient is a good
thing in itself.

> Perhaps there ought to be a separate API, such as 
> sys.clear_freelists(), to eliminate other memory use when 
> needed.  Putting this in GC seems like feature creep and
> has negative performance implications (long running programs
> will likely find an immediate need to reallocate the freed
> members).

Performance claims should be substanstiated with actual numbers,
otherwise it's too easy to clutter the API with gratuitous
complications. The impact of reallocating may be negligible, or it might
even be positive if it improves cache locality.
History
Date User Action Args
2009-08-15 22:50:45pitrousetrecipients: + pitrou, gvanrossum, skip.montanaro, rhettinger, matthiastroffaes
2009-08-15 22:50:43pitroulinkissue6695 messages
2009-08-15 22:50:43pitroucreate