mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
Refactoring
This commit is contained in:
parent
11319808bc
commit
5d1a605b66
3 changed files with 3 additions and 3 deletions
2
gc.c
2
gc.c
|
@ -1345,7 +1345,7 @@ void gc_thread_data_init(gc_thread_data *thd, int mut_num, char *stack_base, lon
|
||||||
thd->thread_state = CYC_THREAD_STATE_NEW;
|
thd->thread_state = CYC_THREAD_STATE_NEW;
|
||||||
//thd->mutator_num = mut_num;
|
//thd->mutator_num = mut_num;
|
||||||
thd->jmp_start = malloc(sizeof(jmp_buf));
|
thd->jmp_start = malloc(sizeof(jmp_buf));
|
||||||
thd->gc_args = malloc(sizeof(object) * NUM_GC_ANS);
|
thd->gc_args = malloc(sizeof(object) * NUM_GC_ARGS);
|
||||||
thd->gc_num_args = 0;
|
thd->gc_num_args = 0;
|
||||||
thd->moveBufLen = 0;
|
thd->moveBufLen = 0;
|
||||||
gc_thr_grow_move_buffer(thd);
|
gc_thr_grow_move_buffer(thd);
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
// Maximum number of args that GC will accept
|
// Maximum number of args that GC will accept
|
||||||
#define NUM_GC_ANS 128
|
#define NUM_GC_ARGS 128
|
||||||
|
|
||||||
// Which way does the CPU grow its stack?
|
// Which way does the CPU grow its stack?
|
||||||
#define STACK_GROWTH_IS_DOWNWARD 1
|
#define STACK_GROWTH_IS_DOWNWARD 1
|
||||||
|
|
|
@ -2869,7 +2869,7 @@ int gc_minor(void *data, object low_limit, object high_limit, closure cont, obje
|
||||||
|
|
||||||
//fprintf(stdout, "DEBUG, started minor GC\n"); // JAE DEBUG
|
//fprintf(stdout, "DEBUG, started minor GC\n"); // JAE DEBUG
|
||||||
// Prevent overrunning buffer
|
// Prevent overrunning buffer
|
||||||
if (num_args > NUM_GC_ANS) {
|
if (num_args > NUM_GC_ARGS) {
|
||||||
printf("Fatal error - too many arguments (%d) to GC\n", num_args);
|
printf("Fatal error - too many arguments (%d) to GC\n", num_args);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue