Assume we are using a Doubling strategy and currently we have 2 fragments with capacities of 4 an 8 respectively.
If the user calls set_len(3) while the vector is on this state, we will have:
fragment 1 with len=3 and capacity=4
fragment 2 with len=0 and capacity=8
This is an invalid fragment state. We must drop the second fragment.
Assume we are using a
Doubling
strategy and currently we have 2 fragments with capacities of 4 an 8 respectively. If the user callsset_len(3)
while the vector is on this state, we will have:This is an invalid fragment state. We must drop the second fragment.