Main Page | Class List | Directories | File List | Class Members | File Members

gc.c File Reference

#include "global.h"
#include "array.h"
#include "multiset.h"
#include "mapping.h"
#include "object.h"
#include "program.h"
#include "stralloc.h"
#include "stuff.h"
#include "pike_error.h"
#include "pike_memory.h"
#include "pike_macros.h"
#include "pike_rusage.h"
#include "pike_types.h"
#include "time_stuff.h"
#include "constants.h"
#include "interpret.h"
#include "bignum.h"
#include "pike_threadlib.h"
#include "gc.h"
#include "main.h"
#include <math.h>
#include "block_alloc.h"

Classes

struct  gc_stack_frame
struct  gc_link_frame
struct  gc_pop_frame
struct  gc_free_extra_frame
struct  gc_frame

Defines

#define GC_LINK_CHUNK_SIZE   64
#define GC_VERBOSE_DO(X)
#define GC_STACK_COMMON_FIELDS
#define GC_POP_FRAME   0x01
#define GC_PREV_WEAK   0x02
#define GC_PREV_STRONG   0x04
#define GC_OFF_STACK   0x08
#define GC_ON_KILL_LIST   0x10
#define BLOCK_ALLOC_NEXT   u.next
#define FREE_POP_FRAME(f)   really_free_gc_frame ((struct gc_frame *) f)
#define FREE_LINK_FRAME(f)   really_free_gc_frame ((struct gc_frame *) f)
#define FREE_FREE_EXTRA_FRAME(f)   really_free_gc_frame ((struct gc_frame *) f)
#define POP2STACK(f)   ((struct gc_stack_frame *) f)
#define LINK2STACK(f)   ((struct gc_stack_frame *) f)
#define STACK2POP(f)   ((struct gc_pop_frame *) f)
#define STACK2LINK(f)   ((struct gc_link_frame *) f)
#define gc_frame   gc_foo_frame
#define CHECK_POP_FRAME(frame)   do {} while (0)
#define BLOCK_ALLOC_NEXT   next
#define INIT_BLOCK(X)
#define CYCLE_DEBUG_MSG(M, TXT)   do {} while (0)

Enumerations

enum  { GARBAGE_RATIO_LOW, GARBAGE_RATIO_HIGH }

Functions

callbackdebug_add_gc_callback (callback_func call, void *arg, callback_func free_func)
void debug_gc_fatal (void *a, int flags, const char *fmt,...)
void debug_gc_touch (void *a)
PMOD_EXPORT INT32 real_gc_check (void *a)
INT32 real_gc_check_weak (void *a)
void exit_gc (void)
int gc_do_weak_free (void *a)
void gc_delayed_free (void *a, int type)
int gc_mark (void *a)
PMOD_EXPORT void gc_cycle_enqueue (gc_cycle_check_cb *checkfn, void *data, int weak)
void gc_cycle_run_queue ()
int gc_cycle_push (void *x, struct marker *m, int weak)
void do_gc_recurse_svalues (struct svalue *s, int num)
void do_gc_recurse_short_svalue (union anything *u, int type)
int gc_do_free (void *a)
size_t do_gc (void *ignored, int explicit_call)
void f__gc_status (INT32 args)
void dump_gc_info (void)
void cleanup_gc (void)

Variables

callbackgc_evaluator_callback = 0
int gc_enabled = 1
double gc_garbage_ratio_low = 0.2
double gc_time_ratio = 0.05
double gc_garbage_ratio_high = 0.5
double gc_average_slowness = 0.9
int num_objects = 2
ALLOC_COUNT_TYPE num_allocs = 0
ALLOC_COUNT_TYPE alloc_threshold = GC_MIN_ALLOC_THRESHOLD
PMOD_EXPORT int Pike_in_gc = 0
int gc_generation = 0
time_t last_gc
int gc_trace = 0 gc_debug = 0
size_t gc_ext_weak_refs
cpu_time_t auto_gc_time = 0
callback_list gc_callbacks
pike_queue gc_mark_queue

Define Documentation

#define BLOCK_ALLOC_NEXT   next
 

#define BLOCK_ALLOC_NEXT   u.next
 

#define CHECK_POP_FRAME frame   )     do {} while (0)
 

#define CYCLE_DEBUG_MSG M,
TXT   )     do {} while (0)
 

#define FREE_FREE_EXTRA_FRAME  )     really_free_gc_frame ((struct gc_frame *) f)
 

#define FREE_LINK_FRAME  )     really_free_gc_frame ((struct gc_frame *) f)
 

#define FREE_POP_FRAME  )     really_free_gc_frame ((struct gc_frame *) f)
 

#define gc_frame   gc_foo_frame
 

#define GC_LINK_CHUNK_SIZE   64
 

#define GC_OFF_STACK   0x08
 

#define GC_ON_KILL_LIST   0x10
 

#define GC_POP_FRAME   0x01
 

#define GC_PREV_STRONG   0x04
 

#define GC_PREV_WEAK   0x02
 

#define GC_STACK_COMMON_FIELDS
 

Value:

void *data;                                                             \
  struct gc_stack_frame *s_prev; /* Previous stack frame. */            \
  unsigned INT16 frameflags

#define GC_VERBOSE_DO  ) 
 

#define INIT_BLOCK  ) 
 

Value:

(X)->flags=(X)->refs=(X)->weak_refs=0;          \
  (X)->frame = 0;

#define LINK2STACK  )     ((struct gc_stack_frame *) f)
 

#define POP2STACK  )     ((struct gc_stack_frame *) f)
 

#define STACK2LINK  )     ((struct gc_link_frame *) f)
 

#define STACK2POP  )     ((struct gc_pop_frame *) f)
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
GARBAGE_RATIO_LOW 
GARBAGE_RATIO_HIGH 


Function Documentation

void cleanup_gc void   ) 
 

struct callback* debug_add_gc_callback callback_func  call,
void *  arg,
callback_func  free_func
 

void debug_gc_fatal void *  a,
int  flags,
const char *  fmt,
  ...
 

void debug_gc_touch void *  a  ) 
 

size_t do_gc void *  ignored,
int  explicit_call
 

void do_gc_recurse_short_svalue union anything u,
int  type
 

void do_gc_recurse_svalues struct svalue s,
int  num
 

void dump_gc_info void   ) 
 

void exit_gc void   ) 
 

void f__gc_status INT32  args  ) 
 

PMOD_EXPORT void gc_cycle_enqueue gc_cycle_check_cb checkfn,
void *  data,
int  weak
 

int gc_cycle_push void *  x,
struct marker m,
int  weak
 

void gc_cycle_run_queue void   ) 
 

void gc_delayed_free void *  a,
int  type
 

int gc_do_free void *  a  ) 
 

int gc_do_weak_free void *  a  ) 
 

int gc_mark void *  a  ) 
 

PMOD_EXPORT INT32 real_gc_check void *  a  ) 
 

INT32 real_gc_check_weak void *  a  ) 
 


Variable Documentation

ALLOC_COUNT_TYPE alloc_threshold = GC_MIN_ALLOC_THRESHOLD
 

cpu_time_t auto_gc_time = 0
 

double gc_average_slowness = 0.9
 

struct callback_list gc_callbacks
 

int gc_enabled = 1
 

struct callback* gc_evaluator_callback = 0
 

size_t gc_ext_weak_refs
 

double gc_garbage_ratio_high = 0.5
 

double gc_garbage_ratio_low = 0.2
 

int gc_generation = 0
 

struct pike_queue gc_mark_queue
 

double gc_time_ratio = 0.05
 

int gc_trace = 0 gc_debug = 0
 

time_t last_gc
 

ALLOC_COUNT_TYPE num_allocs = 0
 

int num_objects = 2
 

PMOD_EXPORT int Pike_in_gc = 0
 


Generated on Fri Jul 22 23:44:29 2005 for Pike by  doxygen 1.3.9.1