You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve memory leak in parser buffer management with threshold-based shrinking
Implement smart buffer shrinking that only reallocates when there's significant waste:
- Only shrink if waste > max(4x remaining data, 64KB)
- When shrinking, allocate 2x remaining data for growth room
- Fall back to cursor strategy for normal cases
This prevents memory leaks from large buffers while avoiding excessive allocations in high-throughput scenarios, addressing both memory efficiency and performance concerns.
0 commit comments