Commit ea4f19a
quic: use arena allocation for packets
Previously Packets were ReqWrap objects with a shared
free-list. This commit changes to a per-Endpoint arena
with no v8 involvement. This is the design I originally
had in mind but I initially went with the simpler
freelist approach to get something working. There's
too much overhead in the reqrap/freelist approach and
individual packets do not really need to be observable
via async hooks.
This design should eliminate the risk of memory fragmentation
and eliminate a significant bottleneck in the hot path.
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
PR-URL: #62589
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>1 parent 21e9239 commit ea4f19aCopy full SHA for ea4f19a
14 files changed
+862-462Lines changed: 862 additions & 462 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src
- quic
- test/cctest
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
345 | 345 | |
346 | 346 | |
347 | 347 | |
| 348 | + |
348 | 349 | |
349 | 350 | |
350 | 351 | |
| ||
427 | 428 | |
428 | 429 | |
429 | 430 | |
| 431 | + |
430 | 432 | |
431 | 433 | |
432 | 434 | |
|
Collapse file
-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | | - |
67 | 66 | |
68 | 67 | |
69 | 68 | |
|
Collapse file
+10-19Lines changed: 10 additions & 19 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
5 | 4 | |
6 | 5 | |
7 | 6 | |
| ||
10 | 9 | |
11 | 10 | |
12 | 11 | |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
| ||
207 | 207 | |
208 | 208 | |
209 | 209 | |
210 | | - |
211 | | - |
212 | | - |
213 | | - |
214 | | - |
215 | | - |
| 210 | + |
| 211 | + |
| 212 | + |
216 | 213 | |
217 | 214 | |
218 | 215 | |
| ||
264 | 261 | |
265 | 262 | |
266 | 263 | |
267 | | - |
| 264 | + |
268 | 265 | |
269 | 266 | |
270 | 267 | |
| ||
273 | 270 | |
274 | 271 | |
275 | 272 | |
276 | | - |
| 273 | + |
277 | 274 | |
278 | 275 | |
279 | 276 | |
| ||
299 | 296 | |
300 | 297 | |
301 | 298 | |
302 | | - |
303 | 299 | |
304 | 300 | |
305 | 301 | |
| ||
367 | 363 | |
368 | 364 | |
369 | 365 | |
370 | | - |
371 | 366 | |
372 | 367 | |
373 | 368 | |
| ||
380 | 375 | |
381 | 376 | |
382 | 377 | |
383 | | - |
384 | 378 | |
385 | 379 | |
386 | 380 | |
| ||
393 | 387 | |
394 | 388 | |
395 | 389 | |
396 | | - |
397 | 390 | |
398 | 391 | |
399 | 392 | |
400 | 393 | |
401 | | - |
402 | 394 | |
403 | 395 | |
404 | 396 | |
| ||
416 | 408 | |
417 | 409 | |
418 | 410 | |
419 | | - |
420 | | - |
421 | | - |
| 411 | + |
422 | 412 | |
| 413 | + |
423 | 414 | |
424 | 415 | |
425 | 416 | |
| ||
429 | 420 | |
430 | 421 | |
431 | 422 | |
432 | | - |
| 423 | + |
433 | 424 | |
434 | 425 | |
435 | 426 | |
436 | 427 | |
437 | 428 | |
438 | 429 | |
439 | 430 | |
440 | | - |
| 431 | + |
441 | 432 | |
442 | 433 | |
443 | 434 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
132 | 132 | |
133 | 133 | |
134 | 134 | |
135 | | - |
| 135 | + |
136 | 136 | |
137 | 137 | |
138 | 138 | |
|
0 commit comments