FreeBSD/contrib/subversion/subversion/libsvn_subr/bit_array.c
/* Given that MAX shall be an actual bit index in a packed bit array,
 * return the number of blocks entries to allocate for the data buffer. */
Given that MAX shall be an actual bit index in a packed bit array,
return the number of blocks entries to allocate for the data buffer.
Given that MAX shall be an actual bit index in a packed bit array return the number of blocks entries to allocate for the data buffer .
static apr_size_t
select_data_size(apr_size_t max)
{
  apr_size_t size = INITIAL_BLOCK_COUNT;
  while (size <= max / BLOCK_SIZE_BITS)
    size *= 2;
  return size;
}
static apr_size_t select_data_size ( apr_size_t max ) { apr_size_t size = INITIAL_BLOCK_COUNT ; while ( size <= max / BLOCK_SIZE_BITS ) size *= 2 ; return size ; }
Given that MAX shall be an actual bit index in a packed bit array,
 return the number of blocks entries to allocate for the data buffer.
Given that MAX shall be an actual bit index in a packed bit array return the number of blocks entries to allocate for the data buffer .
/* We allocate a power of two of bytes but at least 16 blocks. */ /* Caution:
   * MAX / BLOCK_SIZE_BITS == SIZE still means that MAX is out of bounds.
   * OTOH, 2 * (MAX/BLOCK_SIZE_BITS) is always within the value range of
   * APR_SIZE_T. */