Switch segment storage from single vector to vector of arrays
authorSoeren Apel <soeren@apelpie.net>
Wed, 8 Feb 2017 17:30:41 +0000 (18:30 +0100)
committerSoeren Apel <soeren@apelpie.net>
Wed, 8 Feb 2017 17:30:41 +0000 (18:30 +0100)
Previously, PV would run out of storage space for the data
segments because data was stored in a vector. As a vector allows
contiguous access to the underlying data (much like an array),
it needs a contiguous section of memory. With incoming data and
constant resizing of the vector, the OS at some point can no
longer supply such a section of memory, causing PV to abort
acquisition.

This change fixes this by using several chunks that are never
grown in size. Instead, new chunks are allocated and added to
the vector as needed. This way, the OS will be able to provide
memory until it runs out of system memory.


No differences found