mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Added GC data structures
This commit is contained in:
parent
9e8a5c45a5
commit
91e52dda62
2 changed files with 10 additions and 1 deletions
4
gc.c
4
gc.c
|
@ -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()
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue