diff --git a/gc.c b/gc.c index 13df5c7a..0bcfeeb4 100644 --- a/gc.c +++ b/gc.c @@ -438,9 +438,9 @@ PHASE 2 - multi-threaded mutator (IE, more than one stack thread): // // Note: will need to use atomics and/or locking to access any // variables shared between threads -static int gc_color_mark = 0; // Black, is swapped during GC -//static const int gc_color_grey = 1; // TODO: appears unused, clean up -static int gc_color_clear = 2; // White, is swapped during GC +static int gc_color_mark = 2; // Black, is swapped during GC +static int gc_color_clear = 3; // White, is swapped during GC +//static const int gc_color_grey = 4; // TODO: appears unused, clean up // unfortunately this had to be split up; const colors are located in types.h static int gc_status_col; diff --git a/include/cyclone/types.h b/include/cyclone/types.h index 85c5517d..ae9e3b3a 100644 --- a/include/cyclone/types.h +++ b/include/cyclone/types.h @@ -91,8 +91,8 @@ typedef enum { STAGE_CLEAR_OR_MARKING // Constant colors are defined here. // The mark/clear colors are defined in the gc module because // the collector swaps their values as an optimization. -const int gc_color_blue = 3; // Unallocate memory -const int gc_color_red = 4; // Memory on the stack +const int gc_color_red = 0; // Memory not to be GC'd, such as on the stack +const int gc_color_blue = 1; // Unallocated memory /* Utility functions */ void **vpbuffer_realloc(void **buf, int *len);