[Patches] [Patch #101753] exception bugfix for gcmodule.c
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 4 Oct 2000 00:06:31 -0700
Patch #101753 has been updated.
Project:
Category: core (C code)
Status: Open
Summary: exception bugfix for gcmodule.c
Follow-Ups:
Date: 2000-Oct-03 09:54
By: nascheme
Comment:
Don't start collection if an exception has been raised otherwise the collector will think that it caused the error.
-------------------------------------------------------
Date: 2000-Oct-04 00:06
By: loewis
Comment:
An interesting bug, and an interesting patch...
How many times is _PyGC_Insert typically invoked before the exception is cleared (e.g. in your test cases)? If that is "often", would it make sense to temporarily increase the threshold0 to delay collection?
e.g.
static int extra_threshold = 0;
if(allocated > threshold0+extra_threshold ...){
if(PyErr_Occurred())
extra_threshold += threshold0 / 10; /* number picked arbitrarily */
else{
extra_threshold = 0;
collecting++;
...
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=101753&group_id=5470