Boost logo

Boost :

Subject: Re: [boost] [pool] Definition of a static_pool ?
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-04-28 08:48:09

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

Because I never figured out a way to *place* an array at
the known physical address in memory where I want it,
such as 0xFFE0, or whatever the address of, say, the
ADC result registers may be in the microcontroller.

Maybe there is a simpler way to do things like this.
But I never got it. Any advice would be welcome.

Best regards, Chris.

Boost list run by bdawes at, gregod at, cpdaniel at, john at