How to control the chunk size of `std::deque` when allocating a new chunk?

后端 未结 1 1908
情话喂你
情话喂你 2021-01-12 04:44

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 doe

1条回答
  •  时光说笑
    2021-01-12 05:12

    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).

    0 讨论(0)
提交回复
热议问题