filehash/ffdb_hash.c
static unsigned int
_ffdb_num_config_info_pages (ffdb_htab_t* hashp, unsigned int num)
{
  unsigned int npages, numelems;

  npages = numelems = 0;
  while (num > 0) {
    /* number of configurations on this page */
    numelems = (hashp->hdr.bsize - PAGE_OVERHEAD)/(sizeof(ffdb_config_info_t));
    if (numelems > num)
      numelems = num;
    num -= numelems;
    npages++;
  } 
  return npages;
}
/**
 * Calculate how many pages configuration information
 * occupies
 */
Calculate how many pages configuration information
occupies
Calculate how many pages configuration information occupies
static unsigned int
_ffdb_num_config_info_pages (ffdb_htab_t* hashp, unsigned int num)
{
  unsigned int npages, numelems;
  npages = numelems = 0;
  while (num > 0) {
    numelems = (hashp->hdr.bsize - PAGE_OVERHEAD)/(sizeof(ffdb_config_info_t));
    if (numelems > num)
      numelems = num;
    num -= numelems;
    npages++;
  } 
  return npages;
}
static unsigned int _ffdb_num_config_info_pages ( ffdb_htab_t * hashp , unsigned int num ) { unsigned int npages , numelems ; npages = numelems = 0 ; while ( num > 0 ) { numelems = ( hashp -> hdr . bsize - PAGE_OVERHEAD ) / ( sizeof ( ffdb_config_info_t ) ) ; if ( numelems > num ) numelems = num ; num -= numelems ; npages ++ ; } return npages ; }
Calculate how many pages configuration information
 occupies
Calculate how many pages configuration information occupies
/* number of configurations on this page */