diff --git a/regressions/ck_ring/validate/ck_ring_spsc_template.c b/regressions/ck_ring/validate/ck_ring_spsc_template.c index f512879..bce9977 100644 --- a/regressions/ck_ring/validate/ck_ring_spsc_template.c +++ b/regressions/ck_ring/validate/ck_ring_spsc_template.c @@ -144,7 +144,8 @@ main(int argc, char *argv[]) assert(nthr >= 1); size = atoi(argv[3]); - assert(size > 0); + assert(size > 4 && (size & size - 1) == 0); + size -= 1; ring = malloc(sizeof(CK_RING_INSTANCE(entry_ring)) * nthr); assert(ring);