What’s the maximum size of a Node.js Buffer

Maximum length of a typed array in V8 is currently set to kSmiMaxValue which depending on the platform is either:

  • 1Gb – 1byte on 32-bit
  • 2Gb – 1byte on 64-bit

Relevant constant in the code is v8::internal::JSTypedArray::kMaxLength (source).

V8 team is working on increasing this even further on 64-bit platforms, where currently ArrayBuffer objects can be up to Number.MAX_SAFE_INTEGER large (2**53 – 1). See bug 4153.

Leave a Comment