Commit 6af7301
Compact consumed data in ReadBuffer.feed() before size check
Previously compaction only happened on read operations. Now feed()
also triggers compaction, ensuring consumed bytes are reclaimed
before new data is appended. This keeps actual memory usage closer
to what max_message_size implies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d977c12 commit 6af7301
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
275 | 291 | | |
276 | 292 | | |
277 | 293 | | |
| |||
0 commit comments