mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 08:47:35 +02:00
Renamed macro
This commit is contained in:
parent
dd4eba97a6
commit
0da8dabc5a
2 changed files with 5 additions and 5 deletions
6
gc.c
6
gc.c
|
@ -1265,15 +1265,15 @@ void gc_thread_data_init(gc_thread_data *thd, int mut_num, char *stack_base, lon
|
||||||
{
|
{
|
||||||
char stack_ref;
|
char stack_ref;
|
||||||
thd->stack_start = stack_base;
|
thd->stack_start = stack_base;
|
||||||
#if STACK_GROWS_DOWNWARD
|
#if STACK_GROWTH_IS_DOWNWARD
|
||||||
thd->stack_limit = stack_base - stack_size;
|
thd->stack_limit = stack_base - stack_size;
|
||||||
#else
|
#else
|
||||||
thd->stack_limit = stack_base + stack_size;
|
thd->stack_limit = stack_base + stack_size;
|
||||||
#endif
|
#endif
|
||||||
if (check_overflow(stack_base, &stack_ref)){
|
if (check_overflow(stack_base, &stack_ref)){
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Error: recompile with STACK_GROWS_DOWNWARD set to %d\n",
|
"Error: Stack is growing in the wrong direction! Rebuild with STACK_GROWTH_IS_DOWNWARD changed to %d\n",
|
||||||
(1 - STACK_GROWS_DOWNWARD));
|
(1 - STACK_GROWTH_IS_DOWNWARD));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
thd->stack_traces = calloc(MAX_STACK_TRACES, sizeof(char *));
|
thd->stack_traces = calloc(MAX_STACK_TRACES, sizeof(char *));
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define NUM_GC_ANS 128
|
#define NUM_GC_ANS 128
|
||||||
|
|
||||||
// Which way does the CPU grow its stack?
|
// Which way does the CPU grow its stack?
|
||||||
#define STACK_GROWS_DOWNWARD 1
|
#define STACK_GROWTH_IS_DOWNWARD 1
|
||||||
|
|
||||||
// Size of the stack buffer, in bytes.
|
// Size of the stack buffer, in bytes.
|
||||||
// This is used as the first generation of the GC.
|
// This is used as the first generation of the GC.
|
||||||
|
@ -159,7 +159,7 @@ typedef enum { STAGE_CLEAR_OR_MARKING
|
||||||
typedef long tag_type;
|
typedef long tag_type;
|
||||||
|
|
||||||
/* Determine if stack has overflowed */
|
/* Determine if stack has overflowed */
|
||||||
#if STACK_GROWS_DOWNWARD
|
#if STACK_GROWTH_IS_DOWNWARD
|
||||||
#define check_overflow(x,y) ((x) < (y))
|
#define check_overflow(x,y) ((x) < (y))
|
||||||
#else
|
#else
|
||||||
#define check_overflow(x,y) ((x) > (y))
|
#define check_overflow(x,y) ((x) > (y))
|
||||||
|
|
Loading…
Add table
Reference in a new issue