Commit 753c25e
authored
fix: proper memory accounting for objects loaded via streaming (#4774)
The bug: during the loading when appending to the existing object,
ItAndUpdater scope did not account for the appended data, and as a result
`object_used_memory` and its variation did not account for streamed objects.
The fix: to extend the scope of the ItAndUpdater object to cover appends.
Added a sanity DCHECK that ensures that object_used_memory is at least as the memory used
by a single object. This dcheck fails pre-fix.
Fixes #4773
Signed-off-by: Roman Gershman <[email protected]>1 parent 8acf849 commit 753c25e
3 files changed
+21
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
| 506 | + | |
| 507 | + | |
503 | 508 | | |
504 | 509 | | |
505 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2544 | 2544 | | |
2545 | 2545 | | |
2546 | 2546 | | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
2547 | 2551 | | |
2548 | 2552 | | |
2549 | 2553 | | |
2550 | | - | |
2551 | | - | |
| 2554 | + | |
| 2555 | + | |
2552 | 2556 | | |
2553 | 2557 | | |
2554 | 2558 | | |
| |||
2557 | 2561 | | |
2558 | 2562 | | |
2559 | 2563 | | |
2560 | | - | |
| 2564 | + | |
2561 | 2565 | | |
2562 | 2566 | | |
2563 | 2567 | | |
| |||
2598 | 2602 | | |
2599 | 2603 | | |
2600 | 2604 | | |
2601 | | - | |
| 2605 | + | |
2602 | 2606 | | |
2603 | 2607 | | |
2604 | 2608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
585 | 587 | | |
586 | 588 | | |
587 | 589 | | |
| |||
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
| 607 | + | |
| 608 | + | |
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
| |||
622 | 626 | | |
623 | 627 | | |
624 | 628 | | |
| 629 | + | |
| 630 | + | |
625 | 631 | | |
626 | 632 | | |
627 | 633 | | |
| |||
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
| 651 | + | |
| 652 | + | |
645 | 653 | | |
646 | 654 | | |
647 | 655 | | |
| |||
0 commit comments