Commit 4acb207
authored
- Adjusted the `approx_bytes` method in `IntrusiveList` to correctly account for the size of the inline `SlotArena`, preventing double-counting.
- Added a regression test to verify that `approx_bytes` reports the correct size for both empty and populated lists, ensuring accurate memory usage reporting.
- Updated documentation to clarify the changes and the rationale behind the adjustments, improving understanding of memory footprint calculations.
1 parent de0517e commit 4acb207
1 file changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
796 | 799 | | |
| 800 | + | |
797 | 801 | | |
798 | 802 | | |
799 | 803 | | |
| |||
1770 | 1774 | | |
1771 | 1775 | | |
1772 | 1776 | | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1773 | 1812 | | |
1774 | 1813 | | |
1775 | 1814 | | |
| |||
0 commit comments