This commit is contained in:
Justin Ethier 2015-11-06 22:02:31 -05:00
parent 33abfc3bfa
commit fdc33e88af

View file

@ -28,8 +28,12 @@ static void Cyc_heap_init(long heap_size)
printf("main: Allocating and initializing heap...\n"); printf("main: Allocating and initializing heap...\n");
#endif #endif
Cyc_heap = gc_heap_create(heap_size / 2, 0, 0); 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 // TODO: alloca this using a vpbuffer, or maybe another type of data structure??
Cyc_mutators = malloc(sizeof(gc_thread_data *) * Cyc_num_mutators); // 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 */ #endif /* CYCLONE_RUNTIME_MAIN_H */