|
From: Martin R. <ru...@us...> - 2004-08-07 00:26:56
|
Update of /cvsroot/foo/fooelk/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13383 Modified Files: type.c Log Message: with some luck: fixed bug which led to garbage collector crashes Index: type.c =================================================================== RCS file: /cvsroot/foo/fooelk/src/type.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** type.c 6 Aug 2004 20:56:42 -0000 1.1.1.1 --- type.c 7 Aug 2004 00:26:42 -0000 1.2 *************** *** 106,110 **** char *p; ! Num_Types = (sizeof(builtin_types) - 1) / sizeof(char *); Max_Type = Num_Types + TYPE_GROW; bytes = Max_Type * sizeof(TYPEDESCR); --- 106,116 ---- char *p; ! /* may be the next line led to the GC crash (both sc and gen). ! * the first Define_Type gets 22, which is T_Broken_Heart ! * (according to include/object.h). crashes sc immediately and ! * gen later, but only if objects of that first defined type are ! * actually created */ ! /* Num_Types = (sizeof(builtin_types) - 1) / sizeof(char *); */ ! Num_Types = sizeof(builtin_types) / sizeof(char *); Max_Type = Num_Types + TYPE_GROW; bytes = Max_Type * sizeof(TYPEDESCR); |