Repository navigation
Commit 33eeddc
committed
Address review: report Vec capacity (not len) in size() for memory accounting
Per nathanb9 on #22706: `size_of_val(slice)` returns `len * size_of::<T>()`,
not the underlying Vec's allocation, so size() under-reports the heap
footprint that the memory pool uses for spill decisions. Switch to the
existing `VecAllocExt::allocated_size()` helper used throughout
multi_group_by (primitive.rs, bytes.rs, mod.rs):
- list.rs: offsets: Vec<O> -> offsets.allocated_size()
- struct_.rs: also account for children: Vec<Box<dyn GroupColumn>>'s
own capacity (previously only child contents were counted)
fixed_size_list.rs has no owned Vec fields beyond outer_nulls (already
correct) so it does not need a change.1 parent af12254 commit 33eeddc
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
0 commit comments