Closed huonw closed 9 years ago
The use of reserve
rather than reserve_exact
means things can be a little over-allocated, but this isn't necessarily wrong?
It looks like reserve
allocates for double the space you actually ask for. As the only operation to grow the size rapidly is multiplication, and that needs a separate allocation anyway, I'd rather not over-allocate quite so much.
Ok, switched to reserve_exact
.
Sweet!
This abstracts out handling the allocator with alignment/sizes etc, and has most interesting operations predefined.