/* Our hash table capability is a power of two */
static unsigned long _dictNextPower(unsigned long size)
{
    unsigned long i = DICT_HT_INITIAL_SIZE; //DICT_HT_INITIAL_SIZE=4

    if (size >= LONG_MAX) return LONG_MAX;
    while(1) {
        if (i >= size)
            return i;
        i *= 2;
    }
}

相关文章:

  • 2021-12-14
  • 1970-01-01
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-02-11
  • 2022-01-12
猜你喜欢
  • 2021-10-14
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-11-30
  • 2022-01-10
相关资源
相似解决方案