This resulted in a real-world application issue:
[1] Assertion failed: (size <= imp::kMaxLength && "too large buffer"), function NewBuffer, file nan.h, line 939.
Buffers of 1GB are definitely realistic when dealing with >4k visual data.
The check is implemented here
|
assert(length <= imp::kMaxLength && "too large buffer"); |
The constant is defined here:
|
static const size_t kMaxLength = 0x3fffffff; |
I believe it should be 4GB as reported by buffer.constants.MAX_LENGTH (https://nodejs.org/api/buffer.html#bufferkmaxlength)