forked from personal/squiggle.c
add comment on size of the C stack
This commit is contained in:
parent
b6bbbc6b2e
commit
a50d776d2c
|
@ -44,7 +44,7 @@ void sampler_parallel(double (*sampler)(uint64_t* seed), double* results, int n_
|
||||||
|
|
||||||
// uint64_t** seeds = malloc((size_t)n_threads * sizeof(uint64_t*));
|
// uint64_t** seeds = malloc((size_t)n_threads * sizeof(uint64_t*));
|
||||||
seed_cache_box* cache_box = (seed_cache_box*) malloc(sizeof(seed_cache_box) * (size_t)n_threads);
|
seed_cache_box* cache_box = (seed_cache_box*) malloc(sizeof(seed_cache_box) * (size_t)n_threads);
|
||||||
// seed_cache_box cache_box[n_threads];
|
// seed_cache_box cache_box[n_threads]; // we could use the C stack. On normal linux machines, it's 8MB ($ ulimit -s). However, it doesn't quite feel right.
|
||||||
srand(1);
|
srand(1);
|
||||||
for (int i = 0; i < n_threads; i++) {
|
for (int i = 0; i < n_threads; i++) {
|
||||||
// Constraints:
|
// Constraints:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user