diff --git a/include/cyclone/runtime-main.h b/include/cyclone/runtime-main.h index bdc098e9..7fb99c6a 100644 --- a/include/cyclone/runtime-main.h +++ b/include/cyclone/runtime-main.h @@ -28,8 +28,12 @@ static void Cyc_heap_init(long heap_size) printf("main: Allocating and initializing heap...\n"); #endif Cyc_heap = gc_heap_create(heap_size / 2, 0, 0); - Cyc_num_mutators = 10; // TODO: alloca this using a vpbuffer, or maybe another type of data structure - Cyc_mutators = malloc(sizeof(gc_thread_data *) * Cyc_num_mutators); + // TODO: alloca this using a vpbuffer, or maybe another type of data structure?? + // Will need this list for later use, but only by the collector thread. so it would be + // nice if there was a way to allocate mutators that avoids expensive synchronization... + // need to think on this when adding thread support, after upgrading the collector + Cyc_num_mutators = 1; + Cyc_mutators = calloc(Cyc_num_mutators, sizeof(gc_thread_data *)); } #endif /* CYCLONE_RUNTIME_MAIN_H */