2 ms·
> On average they consume about twice the memory of a fixed array of the same size. Not to split hairs, but that’s just the “unfreed” memory overhead. If you
by fovc 3y ago
> On average they consume about twice the memory of a fixed array of the same size.
Not to split hairs, but that’s just the “unfreed” memory overhead.
If you have 2^n+1 elements, you’ve provisioned 2^(n+1) slots and leaked ~2^(n+1) on top, making the actual overhead there closer to 4x.
I think that means the average overhead is more like 3x (sometimes 4x, sometimes 2x).