Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-08-25 15:31:13


--- Andreas Huber <ah2003_at_[hidden]> wrote:

> [snip]
> > So far my experience indicates that people only bother with
> > allocators when std::allocator is inadequate, i.e. slow.
>
> ... or non-deterministic. Using such an allocator in a hard real-time system
> is simply not an option.
> AFAIK, a deterministic allocator must inevitably have a separate heap for
> each possible object size. The difficult part is reserving enough slots in
> each heap at startup, before deterministic reaction is necessary. I don't
> see how a system could do this automatically when memory is scarce.

Depending on the requirements, you can try to overload new/delete
for your data types and make it deterministic.
I know it is not always an option.

BTW: Having separate heaps is one of the reasons why I could not
use boost::shared_ptr. I ended up writing my own. :(

Eugene

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk