Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-02 12:01:55


Hi,

between the lines of the "copy on write" thread I found to read the statement:

   "There are threads in a program, so everything has to thread-safe."

I believe this is not exactly true. In fact, the need for "wild & freestyle"
shared read/write access most often indicates poor software design.

Another closely related statement is something like:

   "Dynamic memory allocation always needs synchronization."

Not necessarily. Not unless memory management is done globally. I know, the
language isn't very supportive in this field. But it brings me to a question
which has been on my mind for quite some time and I never found the time to ask:

   "Why aren't there more Boost components to customize memory management ?"

If there was a way for me to express e.g. "these objects are very likely to get
reallocated with different sizes, so leave some space" for a string buffer
pool or "give me a custom heap allocator" for for thread specific data, it would
increase my willingness to do so and a few seconds of typing for a significant
ammount of performance is generally a good deal.
The downside is, that it is unlikely to be possible to find an error-proof
design (one whithout traps only detectable at runtime, that is - e.g. providing
a standard allocator based on object_pool in Boost.Pool). However, I don't think
requiring a debug session from a user who's ignoring advise from the
documentation should stop any efforts in this direction.

Anything in the pipeline (perhaps further development of Boost.Pool) ?
Any others interested in this ?
Am I missing something ?
Volunteers ?

Regards,

Tobias


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