Node.js heap memory limit for single object

后端 未结 1 869
-上瘾入骨i
-上瘾入骨i 2020-12-10 05:52

Does v8 have limits on the heap allocations for single objects?

a = new Array(1024*1024*102)

fails on node command-line with

FATA

相关标签:
1条回答
  • 2020-12-10 06:30

    It turns out that there are hard-limits put on the maximum size of strings, objects and arrays. The limts are a remnant of the old garbage collector. Here is the relevant ticket:

    https://code.google.com/p/v8/issues/detail?id=3505

    0 讨论(0)
提交回复
热议问题