ensureCapacity

void ensureCapacity(long maximumSize) {
    int i;
    int maximum = (int) min(maximumSize, (unsigned int)MAX_VALUE >> 1);

    int length=(maximum == 0) ? 1 : maximum;
    table = (long **)zmalloc(8*length);
   
    for(i=0;i<length;i++)
        table[i]=0;

    tableMask = max(0, length - 1);
    sampleSize = (maximumSize == 0) ? 10 : (10 * maximum);
 
    if (sampleSize <= 0) {
      sampleSize = MAX_VALUE;
    }
    size = 0;
  }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<--- Last few GCs ---> [11584:0000020B71203B50] 69329 ms: Scavenge (reduce) 2037.9 (2050.3) -> 2037.3 (2051.3) MB, 6.3 / 0.0 ms (average mu = 0.348, current mu = 0.419) allocation failure [11584:0000020B71203B50] 69339 ms: Scavenge (reduce) 2038.2 (2053.3) -> 2037.6 (2053.3) MB, 3.2 / 0.0 ms (average mu = 0.348, current mu = 0.419) allocation failure [11584:0000020B71203B50] 69348 ms: Scavenge (reduce) 2038.3 (2050.5) -> 2038.1 (2052.0) MB, 3.3 / 0.0 ms (average mu = 0.348, current mu = 0.419) allocation failure 12: 00007FF6482BAB44 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller+84 13: 00007FF6482BAE43 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithMap+35 14: 00007FF6480C8A10 v8::internal::HashTable<v8::internal::NameDictionary,v8::internal::NameDictionaryShape>::EnsureCapacity<v8::internal::Isolate>+208 15: 00007FF6480C6086 v8::internal::Dictionary<v8::internal::NameDictionary,v8::internal::NameDictionaryShape>::Add<v8::internal::Isolate>+102 16: 00007FF6480CF346 v8::internal::BaseNameDictionary<v8::internal::NameDictionary,v8::internal::NameDictionaryShape>::Add+118 17: 00007FF647FC430C v8::internal::Runtime::GetObjectProperty+2204 18: 00007FF64848B50D v8::internal::SetupIsolateDelegate::SetupHeap+463949 19: 00007FF6485017A9 v8::internal::SetupIsolateDelegate::SetupHeap+947945 20: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 21: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 22: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 23: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 24: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 25: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 26: 00007FF648423EF2 v8::internal::SetupIsolateDelegate::SetupHeap+40498 27: 0000028E519B08BF
07-22

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值