Classes | Macros | Functions | Variables
collector.c File Reference
#include <sys/times.h>
#include "eus.h"
#include <sys/param.h>
#include "time.h"
#include "rgc_utils.h"
#include "xccmem.h"
Include dependency graph for collector.c:

Go to the source code of this file.

Classes

struct  _marking_state
 

Macros

#define GCDEBUG
 
#define gcpush(v, off)
 
#define MAXDISPOSE   256
 
#define PMAXSTACK   (MAXSTACK * 110)
 

Functions

unsigned int allocate_heap ()
 
void barrier_destroy (barrier_t barrier)
 
barrier_t barrier_init (int n_clients)
 
void barrier_reset (barrier_t barrier, int n_clients)
 
void barrier_wait (barrier_t barrier)
 
static call_disposers ()
 
void collect ()
 
void do_a_little_gc_work (int m_unit, int s_unit)
 
unsigned int do_allocate_heap (unsigned int req_words)
 
static int do_gc_epilogue ()
 
static void do_scan_roots ()
 
static void go_on_to_sweep_phase ()
 
void init_rgc ()
 
static void init_sync_data ()
 
static int mark_a_little (int m_unit)
 
static bpointer mergecell (register bpointer p, int cbix)
 
void notify_gc ()
 
static pnewgcstack (ms_entry *oldsp)
 
int reclaim (bpointer p)
 
void rgc_add_to_classtable (pointer newclass)
 
pointer RGC_GCTIME (register context *ctx, int n, pointer argv[])
 
pointer RGCCOUNT (register context *ctx, int n, pointer argv[])
 
void rgcfunc (register context *ctx, pointer mod)
 
static void scan_global_roots ()
 
static void scan_local_roots (int i)
 
static int sweep_a_little (int gcmerge, int s_unit)
 
static void wait_until_next_gc_cycle ()
 

Variables

static int black_cells
 
static pointer dispose [MAXDISPOSE]
 
static int dispose_count
 
static int free_cells
 
struct _gc_data gc_data
 
static int gcmerge
 
unsigned int gs [MAXTHREAD]
 
pointer K_DISPOSE
 
long marked_words = 0
 
static struct _marking_state marking_state
 
int ps_sem = 1
 
volatile pointerpsp = pstack
 
pointer pstack [PMAXSTACK]
 
mutex_t pstack_lock
 
pointerpstacklimit = pstack + PMAXSTACK
 
static pointer rgc_classtable = NULL
 
static int rgc_credit = 0
 
barrier_t startup_barrier
 
struct _sweeping_state sweeping_state
 
struct {
   mutex_t *   lock
 
   thread_t   tid
 
   char   using
 
thread_table []
 
long long values []
 
static int white_cells
 

Macro Definition Documentation

◆ GCDEBUG

#define GCDEBUG

Definition at line 56 of file collector.c.

◆ gcpush

#define gcpush (   v,
  off 
)
Value:
{ \
lgcsp->addr = (pointer)v; \
lgcsp->offset = off; \
lgcsp++; \
}
struct cell * pointer
Definition: eus.h:165
GLfloat v[8][3]
Definition: cube.c:21

Definition at line 296 of file memory.mutex.c.

◆ MAXDISPOSE

#define MAXDISPOSE   256

Definition at line 63 of file memory.c.

◆ PMAXSTACK

#define PMAXSTACK   (MAXSTACK * 110)

Definition at line 1118 of file collector.c.

Function Documentation

◆ allocate_heap()

unsigned int allocate_heap ( )

Definition at line 1195 of file collector.c.

◆ barrier_destroy()

void barrier_destroy ( barrier_t  barrier)

Definition at line 1148 of file collector.c.

◆ barrier_init()

barrier_t barrier_init ( int  n_clients)

Definition at line 1128 of file collector.c.

◆ barrier_reset()

void barrier_reset ( barrier_t  barrier,
int  n_clients 
)

Definition at line 1141 of file collector.c.

◆ barrier_wait()

void barrier_wait ( barrier_t  barrier)

Definition at line 1155 of file collector.c.

◆ call_disposers()

static call_disposers ( )
static

Definition at line 98 of file collector.c.

◆ collect()

void collect ( )

Definition at line 913 of file collector.c.

◆ do_a_little_gc_work()

void do_a_little_gc_work ( int  m_unit,
int  s_unit 
)

Definition at line 886 of file collector.c.

◆ do_allocate_heap()

unsigned int do_allocate_heap ( unsigned int  req_words)

Definition at line 1177 of file collector.c.

◆ do_gc_epilogue()

static int do_gc_epilogue ( )
static

Definition at line 850 of file collector.c.

◆ do_scan_roots()

static void do_scan_roots ( )
static

Definition at line 784 of file collector.c.

◆ go_on_to_sweep_phase()

static void go_on_to_sweep_phase ( )
inlinestatic

Definition at line 118 of file collector.c.

◆ init_rgc()

void init_rgc ( )

Definition at line 484 of file collector.c.

◆ init_sync_data()

static void init_sync_data ( )
static

Definition at line 1038 of file collector.c.

◆ mark_a_little()

static int mark_a_little ( int  m_unit)
static

Definition at line 137 of file collector.c.

◆ mergecell()

static bpointer mergecell ( register bpointer  p,
int  cbix 
)
static

Definition at line 355 of file collector.c.

◆ notify_gc()

void notify_gc ( )

Definition at line 716 of file collector.c.

◆ pnewgcstack()

static pnewgcstack ( ms_entry oldsp)
static

Definition at line 77 of file collector.c.

◆ reclaim()

int reclaim ( bpointer  p)

Definition at line 315 of file collector.c.

◆ rgc_add_to_classtable()

void rgc_add_to_classtable ( pointer  newclass)

Definition at line 518 of file collector.c.

◆ RGC_GCTIME()

pointer RGC_GCTIME ( register context ctx,
int  n,
pointer  argv[] 
)

Definition at line 1219 of file collector.c.

◆ RGCCOUNT()

pointer RGCCOUNT ( register context ctx,
int  n,
pointer  argv[] 
)

Definition at line 1213 of file collector.c.

◆ rgcfunc()

void rgcfunc ( register context ctx,
pointer  mod 
)

Definition at line 1235 of file collector.c.

◆ scan_global_roots()

static void scan_global_roots ( )
static

Definition at line 532 of file collector.c.

◆ scan_local_roots()

static void scan_local_roots ( int  i)
static

Definition at line 551 of file collector.c.

◆ sweep_a_little()

static int sweep_a_little ( int  gcmerge,
int  s_unit 
)
static

Definition at line 389 of file collector.c.

◆ wait_until_next_gc_cycle()

static void wait_until_next_gc_cycle ( )
static

Definition at line 818 of file collector.c.

Variable Documentation

◆ black_cells

int black_cells
static

Definition at line 59 of file collector.c.

◆ dispose

pointer dispose[MAXDISPOSE]
static

Definition at line 44 of file collector.c.

◆ dispose_count

int dispose_count
static

Definition at line 45 of file collector.c.

◆ free_cells

int free_cells
static

Definition at line 59 of file collector.c.

◆ gc_data

struct _gc_data gc_data

Definition at line 53 of file collector.c.

◆ gcmerge

int gcmerge
static

Definition at line 45 of file collector.c.

◆ gs

unsigned int gs[MAXTHREAD]

Definition at line 712 of file collector.c.

◆ K_DISPOSE

pointer K_DISPOSE

Definition at line 135 of file eus.c.

◆ lock

mutex_t* lock

Definition at line 49 of file collector.c.

◆ marked_words

long marked_words = 0

Definition at line 135 of file collector.c.

◆ marking_state

struct _marking_state marking_state
static

◆ ps_sem

int ps_sem = 1

Definition at line 1036 of file collector.c.

◆ psp

volatile pointer* psp = pstack

Definition at line 1120 of file collector.c.

◆ pstack

pointer pstack[PMAXSTACK]

Definition at line 1119 of file collector.c.

◆ pstack_lock

mutex_t pstack_lock

Definition at line 1122 of file collector.c.

◆ pstacklimit

pointer* pstacklimit = pstack + PMAXSTACK

Definition at line 1121 of file collector.c.

◆ rgc_classtable

pointer rgc_classtable = NULL
static

Definition at line 516 of file collector.c.

◆ rgc_credit

int rgc_credit = 0
static

Definition at line 351 of file collector.c.

◆ startup_barrier

barrier_t startup_barrier

Definition at line 54 of file collector.c.

◆ sweeping_state

struct _sweeping_state sweeping_state

Definition at line 116 of file collector.c.

◆ thread_table

struct { ... } thread_table[]

◆ tid

thread_t tid

Definition at line 50 of file collector.c.

◆ using

char using

Definition at line 48 of file collector.c.

◆ values

long long values[]

◆ white_cells

int white_cells
static

Definition at line 59 of file collector.c.



euslisp
Author(s): Toshihiro Matsui
autogenerated on Mon Feb 28 2022 22:18:28