Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2003-08-25 16:03:23


E. Gladyshev wrote:

[snip]
>> ... 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.

I know, I just mentioned this because Peter seems to suggest that the need
for memory management customization is rare if the compiler folks did their
job right. However, for a certain class of systems one almost never can
avoid customization, no matter how ingenious the platform is.

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

Yeah, I ended up using intrusive_ptr. Not always an option either ...

Regards,

Andreas


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