2000-02-02
2000-02-02 22:57:09 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
4452c19323b9ad4669023720fda9b90ffed8de8a
(10 lines)
(+6/-4)
[
Show
| Annotate
]
Branch: 7.9
bugfix for compiling without debug
Rev: src/gc.c:1.47
29:
#include "block_alloc.h"
- RCSID("$Id: gc.c,v 1.46 2000/02/02 00:38:27 hubbe Exp $");
+ RCSID("$Id: gc.c,v 1.47 2000/02/02 22:57:09 hubbe Exp $");
/* Run garbage collect approximate every time we have
* 20 percent of all arrays, objects and programs is
47:
INT32 alloc_threshold = MIN_ALLOC_THRESHOLD;
static int in_gc = 0;
struct pike_queue gc_mark_queue;
+ time_t last_gc;
-
+
static double objects_alloced = 0.0;
static double objects_freed = 0.0;
72: Inside #if defined(PIKE_DEBUG)
#ifdef PIKE_DEBUG
- time_t last_gc;
-
+
void dump_gc_info(void)
{
fprintf(stderr,"Current number of objects: %ld\n",(long)num_objects);
612: Inside #if defined(PIKE_DEBUG)
if(num_objects < 0)
fatal("Panic, less than zero objects!\n");
- last_gc=TIME(0);
+
#endif
-
+ last_gc=TIME(0);
+
multiplier=pow(MULTIPLIER, (double) num_allocs / (double) alloc_threshold);
objects_alloced*=multiplier;
objects_alloced += (double) num_allocs;