Is there some "standard" container (STL, boost) which can present multiple memory chunks as single continuous one? I need to work with some data with following conditions:
- Total size of data is not known in advance (web response)
- Memory is allocated in chunks (with some external allocation function, which I have no control of)
- Memory freeing is not controlled by me, so reallocations are relatively expensive
So, after getting all the data, I have a list of memory chunks. And I need to apply some STL algorithms (search, copy, etc.) to data as a whole. There is a solution to write container to hold info about these chunks + forward iterator which is able to "jump" from one chunk to another.
But problem seems rather general, so I hope that there is some well-known answer which I'm missing. Thanks in advance.