Added GC data structures

This commit is contained in:
Justin Ethier 2015-10-28 22:14:14 -04:00
parent 9e8a5c45a5
commit 91e52dda62
2 changed files with 10 additions and 1 deletions

4
gc.c
View file

@ -480,6 +480,10 @@ static const int gc_color_blue = 3;
static int gc_status_col;
static int gc_stage;
// Does not need sync, only used by collector thread
static void **mark_stack;
static int mark_stack_len;
// GC functions called by the Mutator threads
void gc_mut_update()

View file

@ -25,8 +25,13 @@ typedef struct gc_thread_data_t gc_thread_data;
struct gc_thread_data_t {
void **moveBuf; /* list of objects moved to heap during GC */
int moveBufLen;
int gc_alloc_color; // For tri-color marking
// Data needed for tri-color marking
int gc_alloc_color;
int gc_mut_status;
int last_write;
int last_read;
void **mark_buffer;
int mark_buffer_len;
};
/* GC data structures */