CACAO
Data Structures | Macros | Typedefs | Functions | Variables
gc.h File Reference

Go to the source code of this file.

Data Structures

struct  list_gcref_entry_t
 

Macros

#define _GC_H
 
#define GCCONF_FINALIZER
 
#define GC_DEBUGGING
 
#define GC_LOG(code)   if (opt_verbosegc) { code; }
 
#define GC_ASSERT(assertion)   assert(assertion)
 
#define GC_LOG2(code)
 
#define GC_SET_FLAGS(obj, flags)   ((obj)->hdrflags |= (flags))
 
#define GC_CLEAR_FLAGS(obj, flags)   ((obj)->hdrflags &= ~(flags))
 
#define GC_TEST_FLAGS(obj, flags)   ((obj)->hdrflags & (flags))
 
#define POINTS_INTO(ptr, ptr_start, ptr_end)   ((void *) (ptr) >= (ptr_start) && (void *) (ptr) < (ptr_end))
 
#define GC_ALIGN_SIZE   SIZEOF_VOID_P
 
#define GC_ALIGN(val, size)   ((((val) + (size) - 1) / (size)) * (size))
 
#define GC_MUTEX_LOCK   threads_mutex_gc_lock()
 
#define GC_MUTEX_UNLOCK   threads_mutex_gc_unlock()
 
#define GC_EXECUTIONSTATE   (thread->es)
 
#define GC_SOURCESTATE   (thread->ss)
 
#define GCSTAT_INIT(cnt)
 
#define GCSTAT_COUNT(cnt)
 
#define GCSTAT_DEC(cnt)
 
#define GCSTAT_COUNT_MAX(cnt, max)
 

Typedefs

typedef struct list_gcref_entry_t list_gcref_entry_t
 

Functions

void gc_collect (s4 level)
 
bool gc_suspend (threadobject *thread, u1 *pc, u1 *sp)
 

Variables

bool gc_pending
 
bool gc_notify_finalizer
 
list_t * gc_reflist_strong
 
list_t * gc_reflist_weak
 

Macro Definition Documentation

#define _GC_H

Definition at line 32 of file gc.h.

#define GC_ALIGN (   val,
  size 
)    ((((val) + (size) - 1) / (size)) * (size))

Definition at line 109 of file gc.h.

#define GC_ALIGN_SIZE   SIZEOF_VOID_P

Definition at line 108 of file gc.h.

#define GC_ASSERT (   assertion)    assert(assertion)

Definition at line 59 of file gc.h.

#define GC_CLEAR_FLAGS (   obj,
  flags 
)    ((obj)->hdrflags &= ~(flags))

Definition at line 102 of file gc.h.

#define GC_DEBUGGING

Definition at line 52 of file gc.h.

#define GC_EXECUTIONSTATE   (thread->es)

Definition at line 148 of file gc.h.

#define GC_LOG (   code)    if (opt_verbosegc) { code; }

Definition at line 58 of file gc.h.

#define GC_LOG2 (   code)

Definition at line 68 of file gc.h.

#define GC_MUTEX_LOCK   threads_mutex_gc_lock()

Definition at line 137 of file gc.h.

#define GC_MUTEX_UNLOCK   threads_mutex_gc_unlock()

Definition at line 138 of file gc.h.

#define GC_SET_FLAGS (   obj,
  flags 
)    ((obj)->hdrflags |= (flags))

Definition at line 101 of file gc.h.

#define GC_SOURCESTATE   (thread->ss)

Definition at line 149 of file gc.h.

#define GC_TEST_FLAGS (   obj,
  flags 
)    ((obj)->hdrflags & (flags))

Definition at line 103 of file gc.h.

#define GCCONF_FINALIZER

Definition at line 46 of file gc.h.

#define GCSTAT_COUNT (   cnt)

Definition at line 189 of file gc.h.

#define GCSTAT_COUNT_MAX (   cnt,
  max 
)

Definition at line 191 of file gc.h.

#define GCSTAT_DEC (   cnt)

Definition at line 190 of file gc.h.

#define GCSTAT_INIT (   cnt)

Definition at line 188 of file gc.h.

#define POINTS_INTO (   ptr,
  ptr_start,
  ptr_end 
)    ((void *) (ptr) >= (ptr_start) && (void *) (ptr) < (ptr_end))

Definition at line 105 of file gc.h.

Typedef Documentation

Definition at line 123 of file gc.h.

Function Documentation

void gc_collect ( s4  level)

Definition at line 233 of file gc.c.

bool gc_suspend ( threadobject thread,
u1 pc,
u1 sp 
)

Definition at line 417 of file gc.c.

Variable Documentation

bool gc_notify_finalizer

Definition at line 56 of file gc.c.

bool gc_pending

Definition at line 54 of file gc.c.

list_t* gc_reflist_strong

Definition at line 58 of file gc.c.

list_t* gc_reflist_weak

Definition at line 59 of file gc.c.