mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 05:57:34 +02:00
Changed color values
Many types are allocated with a zeroed-out header, so making the red color 0 is now consistent with that code.
This commit is contained in:
parent
bfc9160c95
commit
be4fd84d63
2 changed files with 5 additions and 5 deletions
6
gc.c
6
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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue