When we insert a new element into a std::deque
, it may allocate a new chunk to contain the element if the existing chunks are all full.
However, how does the implementation control the chunk size?
Is it possible for the user to control the chunk size? or it just depends on the implementation's choice, e.g. 4K or 8K?
This is a chosen value of the implementation, and there is no control over it.
For example Microsoft choose values of 16 or smaller for the number of elements in a block. (Search for _DEQUESIZ).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With