Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to using std::min() when allocating Buffers on the C++ side. T…
…his will result in Buffers being allocated to the size requested up to kMaxLength (0x3fffffff) instead of the current behavior of always allocating kMaxLength. Since these buffers are allocated in the node external memory (limited to 64M) the old behavior would very quickly cause massive GC pressure as the GC is triggered on each new Buffer allocation once the node external memory limit is reached. It appears the old behavior was not intentional and should have always been std::min(). This should fix node-ffi-napi#72
- Loading branch information