Classes | Macros | Typedefs | Functions | Variables
collector.h File Reference
#include "rgc_utils.h"
#include "xccmem.h"
Include dependency graph for collector.h:

Go to the source code of this file.

Classes

struct  _gc_data
 
struct  _sweeping_state
 
struct  barrier_struct
 
struct  ms_entry
 

Macros

#define active_mutator_num   gc_data.active_mutator_num
 
#define AM_UNIT   (M_UNIT)
 
#define AS_UNIT   (S_UNIT)
 
#define blacked_hd(p)   (p->h.bix & BLACKTAG)
 
#define blacked_map(p)   blacked_hd(p)
 
#define BLACKTAG   0x40
 
#define busy_sema_post(k)
 
#define busy_sema_wait(k)
 
#define collector_lock   gc_data.collector_lock
 
#define collector_sp   gc_data.collector_sp
 
#define collector_stack   gc_data.collector_stack
 
#define collector_stacklimit   gc_data.collector_stacklimit
 
#define colored_hd(p)   (p->h.bix & COLORTAG)
 
#define colored_map(p)   colored_hd(p)
 
#define COLORTAG   0x60
 
#define DEFAULT_EXPAND_SIZE_IDX   24 /* about ??? KB */
 
#define DEFAULT_GC_THRESHOLD   0.25
 
#define DEFAULT_MAX_RGCSTACK   32768 /* 16384 */
 
#define FREETAG   0x20
 
#define GC_ACTIVATE_CUSHION   15 /* 10...20 */
 
#define gc_cmp_cnt   gc_data.gc_cmp_cnt
 
#define gc_counter   gc_data.gc_counter
 
#define GC_GRANULARITY   2 /* 2, 4 */
 
#define gc_net_free   gc_data.gc_net_free
 
#define gc_phase   gc_data.gc_phase
 
#define GC_POINT
 
#define gc_point_sync   gc_data.gc_point_sync
 
#define GC_REGION(cmp_statement)   cmp_statement
 
#define gc_region_sync   gc_data.gc_region_sync
 
#define gc_state_lock   gc_data.gc_state_lock
 
#define gc_wakeup_cnt   gc_data.gc_wakeup_cnt
 
#define gc_wakeup_cv   gc_data.gc_wakeup_cv
 
#define GRAYTAG   0x20
 
#define INITIAL_HEAP_SIZE   2500
 
#define lock_collector   mutex_lock(&collector_lock)
 
#define M_UNIT   8000 /* 4000 */
 
#define marked_hd(p)   (p->h.bix & BLACKTAG)
 
#define marked_map(p)   marked_hd(p)
 
#define markoff_hd(p)   (p->h.bix &= TAGMASK)
 
#define markoff_map(p)   markoff_hd(p)
 
#define markon_hd(p)   (p->h.bix |= BLACKTAG)
 
#define markon_map(p)   markon_hd(p)
 
#define mut_stat_phase   gc_data.mut_stat_phase
 
#define pgcpop()   ( *(--(ctx->gsp)) )
 
#define pgcpush(v)
 
#define pgpush(v)   ( *ctx->gsp++ = ((pointer)v) )
 
#define PHASE_EPILOGUE   2
 
#define PHASE_MARK   4
 
#define PHASE_NOGC   0
 
#define PHASE_PROLOGUE   1
 
#define PHASE_ROOT_CORE   5
 
#define PHASE_ROOT_REM   6
 
#define PHASE_SWEEP   3
 
#define pointerpop(lv)
 
#define pointerpush(v)
 
#define ppush(v)   ( *psp++ = ((pointer)v) )
 
#define REALTIME_ALLOC_LIMIT_IDX   12 /* 1131 words */
 
#define ri_core_phase   gc_data.ri_core_phase
 
#define ri_end_cv   gc_data.ri_end_cv
 
#define S_UNIT   256 /* 128, 256, 512 */
 
#define TAGMASK   0x1f
 
#define unlock_collector   mutex_unlock(&collector_lock)
 

Typedefs

typedef struct barrier_structbarrier_t
 

Functions

unsigned int allocate_heap ()
 
barrier_t barrier_init (int)
 
void barrier_reset (barrier_t, int)
 
void barrier_wait (barrier_t)
 
void do_a_little_gc_work ()
 
void notify_gc ()
 

Variables

struct _gc_data gc_data
 
mutex_t gcstate_lock
 
char * minmemory =(char *)0xffffffff
 
volatile long newheap
 
volatile pointeroldpsp
 
volatile long pastfree
 
int ps_sem
 
volatile pointerpsp
 
pointer pstack []
 
mutex_t pstack_lock
 
pointerpstacklimit
 
barrier_t startup_barrier
 
volatile long sweepheap
 
struct _sweeping_state sweeping_state
 

Macro Definition Documentation

#define active_mutator_num   gc_data.active_mutator_num

Definition at line 231 of file collector.h.

#define AM_UNIT   (M_UNIT)

Definition at line 47 of file collector.h.

#define AS_UNIT   (S_UNIT)

Definition at line 48 of file collector.h.

#define blacked_hd (   p)    (p->h.bix & BLACKTAG)

Definition at line 182 of file collector.h.

#define blacked_map (   p)    blacked_hd(p)

Definition at line 176 of file collector.h.

#define BLACKTAG   0x40

Definition at line 171 of file collector.h.

#define busy_sema_post (   k)
Value:
{ \
int i; \
do { \
} while (cas_int(k, i, i + 1)); \
}
#define read_volatile_int(loc)
Definition: xccmem.h:1039
#define finish_access_before_read()
Definition: xccmem.h:1115
#define cas_int(loc, ov, nv)
Definition: xccmem.h:1087

Definition at line 303 of file collector.h.

#define busy_sema_wait (   k)
Value:
{ \
int i; \
do { \
while ((i = read_volatile_int(k)) <= 0); \
} while (cas_int(k, i, i - 1)); \
}
#define read_volatile_int(loc)
Definition: xccmem.h:1039
#define start_access_after_write()
Definition: xccmem.h:1106
#define cas_int(loc, ov, nv)
Definition: xccmem.h:1087

Definition at line 296 of file collector.h.

#define collector_lock   gc_data.collector_lock

Definition at line 244 of file collector.h.

#define collector_sp   gc_data.collector_sp

Definition at line 228 of file collector.h.

#define collector_stack   gc_data.collector_stack

Definition at line 227 of file collector.h.

#define collector_stacklimit   gc_data.collector_stacklimit

Definition at line 229 of file collector.h.

#define colored_hd (   p)    (p->h.bix & COLORTAG)

Definition at line 181 of file collector.h.

#define colored_map (   p)    colored_hd(p)

Definition at line 175 of file collector.h.

#define COLORTAG   0x60

Definition at line 172 of file collector.h.

#define DEFAULT_EXPAND_SIZE_IDX   24 /* about ??? KB */

Definition at line 36 of file collector.h.

#define DEFAULT_GC_THRESHOLD   0.25

Definition at line 38 of file collector.h.

#define DEFAULT_MAX_RGCSTACK   32768 /* 16384 */

Definition at line 34 of file collector.h.

#define FREETAG   0x20

Definition at line 169 of file collector.h.

#define GC_ACTIVATE_CUSHION   15 /* 10...20 */

Definition at line 43 of file collector.h.

#define gc_cmp_cnt   gc_data.gc_cmp_cnt

Definition at line 248 of file collector.h.

#define gc_counter   gc_data.gc_counter

Definition at line 232 of file collector.h.

#define GC_GRANULARITY   2 /* 2, 4 */

Definition at line 50 of file collector.h.

#define gc_net_free   gc_data.gc_net_free

Definition at line 249 of file collector.h.

#define gc_phase   gc_data.gc_phase

Definition at line 230 of file collector.h.

#define GC_POINT

Definition at line 170 of file eus.h.

#define gc_point_sync   gc_data.gc_point_sync

Definition at line 233 of file collector.h.

#define GC_REGION (   cmp_statement)    cmp_statement

Definition at line 171 of file eus.h.

#define gc_region_sync   gc_data.gc_region_sync

Definition at line 234 of file collector.h.

#define gc_state_lock   gc_data.gc_state_lock

Definition at line 243 of file collector.h.

#define gc_wakeup_cnt   gc_data.gc_wakeup_cnt

Definition at line 247 of file collector.h.

#define gc_wakeup_cv   gc_data.gc_wakeup_cv

Definition at line 246 of file collector.h.

#define GRAYTAG   0x20

Definition at line 170 of file collector.h.

#define INITIAL_HEAP_SIZE   2500

Configuration parameters for RGC INITIAL_HEAP_SIZE: DEFAULT_EXPAND_SIZE_IDX: heap is expanded by this size at a time. REAL_TIME_ALLOC_LIMIT_IDX: real-time allocation are guranteed up to this size of memory requests. DEFAULT_GC_THRESHOLD: when heap vacancy rate is below this, the next gc cycle starts. R_UNIT: not yet used. M_UNIT: S_UNIT:

Definition at line 29 of file collector.h.

#define lock_collector   mutex_lock(&collector_lock)

Definition at line 251 of file collector.h.

#define M_UNIT   8000 /* 4000 */

Definition at line 45 of file collector.h.

#define marked_hd (   p)    (p->h.bix & BLACKTAG)

Definition at line 185 of file collector.h.

#define marked_map (   p)    marked_hd(p)

Definition at line 179 of file collector.h.

#define markoff_hd (   p)    (p->h.bix &= TAGMASK)

Definition at line 184 of file collector.h.

#define markoff_map (   p)    markoff_hd(p)

Definition at line 178 of file collector.h.

#define markon_hd (   p)    (p->h.bix |= BLACKTAG)

Definition at line 183 of file collector.h.

#define markon_map (   p)    markon_hd(p)

Definition at line 177 of file collector.h.

#define mut_stat_phase   gc_data.mut_stat_phase

Definition at line 236 of file collector.h.

#define pgcpop ( )    ( *(--(ctx->gsp)) )

Definition at line 292 of file collector.h.

#define pgcpush (   v)
Value:
( ctx->gsp < ctx->gcstacklimit ? \
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition: eus.c:297
#define pgpush(v)
Definition: collector.h:289
GLfloat v[8][3]
Definition: cube.c:21

Definition at line 290 of file collector.h.

#define pgpush (   v)    ( *ctx->gsp++ = ((pointer)v) )

Definition at line 289 of file collector.h.

#define PHASE_EPILOGUE   2

Definition at line 84 of file collector.h.

#define PHASE_MARK   4

Definition at line 87 of file collector.h.

#define PHASE_NOGC   0

Definition at line 82 of file collector.h.

#define PHASE_PROLOGUE   1

Definition at line 83 of file collector.h.

#define PHASE_ROOT_CORE   5

Definition at line 85 of file collector.h.

#define PHASE_ROOT_REM   6

Definition at line 86 of file collector.h.

#define PHASE_SWEEP   3

Definition at line 88 of file collector.h.

#define pointerpop (   lv)
Value:
{ \
lv = *(--psp); \
}
#define busy_sema_post(k)
Definition: collector.h:303
#define busy_sema_wait(k)
Definition: collector.h:296
int ps_sem
Definition: collector.c:1036
volatile pointer * psp
Definition: collector.c:1120

Definition at line 316 of file collector.h.

#define pointerpush (   v)
Value:
{ \
}
#define busy_sema_post(k)
Definition: collector.h:303
#define busy_sema_wait(k)
Definition: collector.h:296
Definition: eus.h:379
int ps_sem
Definition: collector.c:1036
volatile pointer * psp
Definition: collector.c:1120
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
Definition: eus.c:297
#define ppush(v)
Definition: collector.h:293
GLfloat v[8][3]
Definition: cube.c:21
pointer * pstacklimit
Definition: collector.c:1121

Definition at line 311 of file collector.h.

#define ppush (   v)    ( *psp++ = ((pointer)v) )

Definition at line 293 of file collector.h.

#define REALTIME_ALLOC_LIMIT_IDX   12 /* 1131 words */

Definition at line 40 of file collector.h.

#define ri_core_phase   gc_data.ri_core_phase

Definition at line 235 of file collector.h.

#define ri_end_cv   gc_data.ri_end_cv

Definition at line 245 of file collector.h.

#define S_UNIT   256 /* 128, 256, 512 */

Definition at line 46 of file collector.h.

#define TAGMASK   0x1f

Definition at line 168 of file collector.h.

#define unlock_collector   mutex_unlock(&collector_lock)

Definition at line 252 of file collector.h.

Typedef Documentation

typedef struct barrier_struct * barrier_t

Function Documentation

unsigned int allocate_heap ( )

Definition at line 1195 of file collector.c.

barrier_t barrier_init ( int  )

Definition at line 1128 of file collector.c.

void barrier_reset ( barrier_t  ,
int   
)

Definition at line 1141 of file collector.c.

void barrier_wait ( barrier_t  )

Definition at line 1155 of file collector.c.

void do_a_little_gc_work ( )
void notify_gc ( )

Definition at line 716 of file collector.c.

Variable Documentation

struct _gc_data gc_data

Definition at line 53 of file collector.c.

mutex_t gcstate_lock
char * minmemory =(char *)0xffffffff

Definition at line 54 of file memory.c.

volatile long newheap
volatile pointer* oldpsp
volatile long pastfree
int ps_sem

Definition at line 1036 of file collector.c.

volatile pointer* psp

Definition at line 1120 of file collector.c.

pointer pstack[]

Definition at line 1119 of file collector.c.

mutex_t pstack_lock

Definition at line 1122 of file collector.c.

pointer* pstacklimit

Definition at line 1121 of file collector.c.

barrier_t startup_barrier

Definition at line 54 of file collector.c.

volatile long sweepheap
struct _sweeping_state sweeping_state


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 20:00:44