
On Sat, Apr 28, 2012 at 12:44 PM, Christopher Kormanyos <e_float@yahoo.com> wrote:
One other idea that may be of interest, though, is the concept of "placing" a custom allocator and its associated pool at a known physical address and granting these the one-shot allocation character that you describe. I have used this technique in combination with various sets of microcontroller registers to overly STL containers like a vector on top of, say, the background readings from a hardware DMA. In this way the DMA "fills up" your vector in a CPU-independent fashion and the user can read the results from the underlying hardware layer---properly packed in the container---with essentially zero cost. I have not yet seen anyone else do this with the STL.
I assume this vector can't be resized. Why use a vector instead of for example an array or ptr pair? -- Olaf