Commit 26361d1
src: add fast path for equal size to
When old and new size match, we can skip the rest of the function,
which makes sense in the case of embedders who do not use Node's
allocator, as that would lead to needlessly allocating and freeing
buffers of identical sizes.
PR-URL: #26573
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>Reallocate()
1 parent b552139 commit 26361d1
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
| 962 | + | |
962 | 963 | | |
963 | 964 | | |
964 | 965 | | |
| |||
0 commit comments