2000-07-02
2000-07-02 02:26:29 by Martin Stjernholm <mast@lysator.liu.se>
-
ddac67aa2878e0a0a026774cec303ccae1ca3f4f
(12 lines)
(+5/-7)
[
Show
| Annotate
]
Branch: 7.9
Fixed bug with accounting for fake objects wrt the gc.
Rev: src/program.c:1.246
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: program.c,v 1.245 2000/06/26 15:56:28 grubba Exp $");
+ RCSID("$Id: program.c,v 1.246 2000/07/02 02:26:29 mast Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
762:
Pike_compiler->fake_object=ALLOC_STRUCT(object);
Pike_compiler->fake_object->storage=0;
#endif
- GC_ALLOC(Pike_compiler->fake_object);
+ /* Can't use GC_ALLOC on fake objects, but still it's good to know
+ * that they never take over a stale gc marker. */
+ if (Pike_in_gc) remove_marker(Pike_compiler->fake_object);
Pike_compiler->fake_object->next=Pike_compiler->fake_object;
Pike_compiler->fake_object->prev=Pike_compiler->fake_object;
3680: Inside #if defined(PIKE_DEBUG)
if (p->next && p->next->prev != p)
fatal("Error in program link list.\n");
}
- /* Count the fake objects. They're not part of the gc, but they're
- * still counted by the gc. */
- if (Pike_compiler->fake_object) n++;
- for (ps = Pike_compiler->previous; ps; ps = ps->previous)
- if (ps->fake_object) n++;
+
return n;
}
#endif