Commit 20b72fc
http2: track memory allocated by nghttp2
Provide a custom memory allocator for nghttp2, and track
memory allocated by the library with it.
This makes the used-memory-per-session estimate more
accurate, and allows us to track memory leaks either
in nghttp2 itself or, more likely, through faulty
usage on our end.
It also allows us to make the per-session memory limit
more accurate in the future; currently, we are not
handling this in an ideal way, and instead let nghttp2
allocate what it wants, even if that goes over our limit.
Backport-PR-URL: #22850
PR-URL: #21374
Refs: #21373
Refs: #21336
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>1 parent e9e4f43 commit 20b72fcCopy full SHA for 20b72fc
File tree
Expand file treeCollapse file tree
4 files changed
+113
-13
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
4 files changed
+113
-13
lines changedOpen diff view settings
Collapse file
+94-5Lines changed: 94 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
486 | 486 | |
487 | 487 | |
488 | 488 | |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
| 499 | + |
| 500 | + |
| 501 | + |
| 502 | + |
| 503 | + |
| 504 | + |
| 505 | + |
| 506 | + |
| 507 | + |
| 508 | + |
| 509 | + |
| 510 | + |
| 511 | + |
| 512 | + |
| 513 | + |
| 514 | + |
| 515 | + |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
| 520 | + |
| 521 | + |
| 522 | + |
| 523 | + |
| 524 | + |
| 525 | + |
| 526 | + |
| 527 | + |
| 528 | + |
| 529 | + |
| 530 | + |
| 531 | + |
| 532 | + |
| 533 | + |
| 534 | + |
| 535 | + |
| 536 | + |
| 537 | + |
| 538 | + |
| 539 | + |
| 540 | + |
| 541 | + |
| 542 | + |
| 543 | + |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
| 552 | + |
| 553 | + |
| 554 | + |
| 555 | + |
| 556 | + |
| 557 | + |
| 558 | + |
| 559 | + |
| 560 | + |
| 561 | + |
| 562 | + |
| 563 | + |
| 564 | + |
| 565 | + |
| 566 | + |
| 567 | + |
| 568 | + |
| 569 | + |
| 570 | + |
| 571 | + |
| 572 | + |
| 573 | + |
| 574 | + |
489 | 575 | |
490 | 576 | |
491 | 577 | |
| ||
517 | 603 | |
518 | 604 | |
519 | 605 | |
520 | | - |
521 | | - |
| 606 | + |
| 607 | + |
| 608 | + |
| 609 | + |
522 | 610 | |
523 | 611 | |
524 | 612 | |
525 | 613 | |
526 | 614 | |
527 | 615 | |
528 | | - |
| 616 | + |
529 | 617 | |
530 | 618 | |
531 | 619 | |
| ||
553 | 641 | |
554 | 642 | |
555 | 643 | |
| 644 | + |
556 | 645 | |
557 | 646 | |
558 | 647 | |
| ||
1160 | 1249 | |
1161 | 1250 | |
1162 | 1251 | |
1163 | | - |
| 1252 | + |
1164 | 1253 | |
1165 | | - |
| 1254 | + |
1166 | 1255 | |
1167 | 1256 | |
1168 | 1257 | |
|
Collapse file
+13-6Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
797 | 797 | |
798 | 798 | |
799 | 799 | |
| 800 | + |
800 | 801 | |
801 | 802 | |
802 | 803 | |
| ||
934 | 935 | |
935 | 936 | |
936 | 937 | |
937 | | - |
938 | | - |
939 | | - |
| 938 | + |
| 939 | + |
| 940 | + |
| 941 | + |
| 942 | + |
| 943 | + |
940 | 944 | |
941 | 945 | |
942 | | - |
943 | | - |
| 946 | + |
944 | 947 | |
945 | 948 | |
946 | 949 | |
| ||
1072 | 1075 | |
1073 | 1076 | |
1074 | 1077 | |
| 1078 | + |
| 1079 | + |
1075 | 1080 | |
1076 | 1081 | |
1077 | 1082 | |
| ||
1274 | 1279 | |
1275 | 1280 | |
1276 | 1281 | |
1277 | | - |
| 1282 | + |
| 1283 | + |
1278 | 1284 | |
1279 | 1285 | |
1280 | 1286 | |
| ||
1301 | 1307 | |
1302 | 1308 | |
1303 | 1309 | |
| 1310 | + |
1304 | 1311 | |
1305 | 1312 | |
1306 | 1313 | |
|
Collapse file
+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
345 | 345 | |
346 | 346 | |
347 | 347 | |
348 | | - |
349 | | - |
| 348 | + |
| 349 | + |
| 350 | + |
350 | 351 | |
351 | 352 | |
352 | 353 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
65 | 65 | |
66 | 66 | |
67 | 67 | |
| 68 | + |
| 69 | + |
| 70 | + |
68 | 71 | |
69 | 72 | |
70 | 73 | |
|
0 commit comments