Branch Coverage

cache.c
Criterion Covered Total %
branch 35 50 70.0


line true false branch
36 0 103 if (n >= (UV_MAX-_MPU_FILL_EXTRA_N))
42 1 102 if (prime_cache_size == padded_n)
45 33 69 if (prime_cache_sieve != 0)
50 102 0 if (n > 0) {
52 0 102 MPUassert(prime_cache_sieve != 0, "sieve returned null");
97 93 252940 if (prime_cache_size < n)
99 0 253033 MPUassert(prime_cache_size >= n, "prime cache is too small!");
100 117994 135039 if (sieve != 0)
126 0 1866 MPUassert(size != 0, "get_prime_segment given null size pointer");
127 0 1866 MPUassert(mutex_init == 1, "segment mutex has not been initialized");
130 1866 0 if (prime_segment_is_available) {
136 1866 0 if (use_prime_segment) {
137 15 1851 if (prime_segment == 0)
145 0 1866 MPUassert(mem != 0, "get_prime_segment allocation failure");
152 1866 0 if (mem == prime_segment) {
157 0 1866 if (mem)
165 69 26 if (!mutex_init) {
173 69 26 if (n == 0)
187 0 10 if (mutex_init == 0) return;
191 1 9 if ( (prime_segment != 0) && (prime_segment_is_available) ) {\
1 0 if ( (prime_segment != 0) && (prime_segment_is_available) ) {\
197 1 9 if (old_segment) Safefree(old_segment);
209 69 0 if (mutex_init) {
215 69 0 if (prime_cache_sieve != 0)
220 14 55 if (prime_segment != 0)