Conversation
BackgroundThe Windows implementation had a critical N-API threading issue where Technical Comparison
Root Cause AnalysisThe Windows implementation attempted a "zero-copy optimization" by keeping buffer references alive, but this violated N-API threading rules. V8 handles (including The POSIX implementation was designed correctly from the start - it never attempted buffer references and always used the safe copy-or-temp-file strategy. Conclusion The memory overhead of copying small buffers (≤4MB) is negligible compared to the benefit of crash-free operation, and large buffers still use efficient temp file streaming on both platforms. |
fixes #1