A blocked vector, used like a File
but is implemented purely in memory, supporting all vectorized operations. The APIs are pretty similar, like general std::io
traits implementation, set_len
(called resize
here), append
, and XX_at
operations (like FileExt
on *nix platforms).
This structure is implemented as a vector of blocks, as the name implies. A block consists of an array of continuous memory pages, whose layout is either through querying the system or from the given parameter (new_paged
, with_len_paged
). This implementation is used to avoid frequent calls of reallocation methods when manipulating with massive data.